Additional
AnyDAC for Delphi 5.0 other changes
Posted by Support [Jun 28, 2011]
What else AnyDAC for Delphi v 5.0 brings additionally to the native Advantage database driver and TADTable with live data window mode ? Here is a list.

ADManager

We have completely reworked the AnyDAC driver manager to simplify it and to avoid potential issues. For example, the classic issue is the "ADManager shutdown timeout" error. Hopefully it is gone into the past. That was really a massive work under the hood.

TADPhysXxxDriverLink

Now it is possible to unload / reload a driver without shutting down the driver manager. That may be required:

 

  • to change the DBMS client library at runtime;
  • to completely release all DBMS resources, including the client library;
  • to restart the driver with different parameters.

 

To release the driver, all connections through this driver must be closed. Then may be called TADPhysXxxDriverLink.Release method. If all is correct, then the DBMS client is unloaded, otherwise an exception will be raised. The DBMS client will be loaded again, when that will be required. For example:

 
ADConnection1.Close;
ADPhysIBDriverLink1.Release;
ADPhysIBDriverLink1.VendorLib := 'E:\ib\fb212\bin\fbclient.dll';
ADConnection1.Open;

Tracing and monitoring

In two words - we made it working clear. In previous AnyDAC versions TADMoniXxxxClientLink's may be activated automatically at the connection establishment with MonitorBy=Xxxx. So, it was impossible to extactly control what to put into trace. Also, there were few other issues.

 

Starting from v 5.0 to enable tracing / monitoring you should:

 

  • add MonitorBy=Xxxx parameter to your connection definition;
  • drop TADMoniXxxxClientLink to a form;
  • set it Tracing property to True, when you want to start tracing output. And to False, when you want to stop. Setting to True at design-time will enable trace output for full application run.

 

For example:

 
ADConnection1.Params.Add('MonitorBy=FlatFile');
ADConnection1.Connected := True;
// do something WITHOUT tracing output
ADMoniFlatFileClientLink1.Tracing := True;
// do something WITH tracing output
ADMoniFlatFileClientLink1.Tracing := False;
// do something WITHOUT tracing output

Environment report

All who have contacted out technical support team probably already are familiar with an AnyDAC environment report. That is the detailed list with practically all parameters, that may required to you or to our support team to resolve the connection issues.

 

But the potential client and server compatibility issues, client installation issues were out of the list. So, we have added them and now you may see your self, while your application is working not as expected. For example, that is environment report for and Oracle connection using 10.1 client and 9.2 server:

 
================================
Connection definition parameters
================================
ConnectionDef=Oracle_Demo
DriverID=Ora
User_Name=addemo
Password=*****
Database=ORA_920_APP
Name=Oracle_Demo
================================
AnyDAC info
================================
Tool = D15 Architect
AnyDAC = 5.0.1 (Build 1835) Professional (internal)
Defines = AnyDAC_32;AnyDAC_Unicode;AnyDAC_DBX;AnyDAC_NOLOCALE_META;
  AnyDAC_MONITOR;AnyDAC_REGEXP;AnyDAC_SynEdit
================================
Client info
================================
Loading driver Ora ...
  Variable [Explicit Oracle Home]: [OraDb10g_home1]
  Searching for Instant Client ...
    Not found !
  Searching for Oracle Home ...
    Checking Oracle Home at key [SoftwareOracle] ...
      Warning: bin folder [c:oracleproduct9.2.0bin] is not in PATH
    Checking Oracle Home at key [SoftwareOracleHome0] ...
      Warning: bin folder [c:oracleproduct9.2.0bin] is not in PATH
    Checking Oracle Home at key [SoftwareOracleHome1] ...
      Warning: bin folder [c:oracleproduct8.1.6bin] is not in PATH
    Checking Oracle Home at key [SoftwareOracleHome2] ...
      Found [C:oracleproduct10.1.0Db_1binoci.dll], position [2147483647],
        in [reg: SoftwareOracleHome2]
    Checking Oracle Home at key [SoftwareOracleKEY_OraDb10g_home1] ...
      Found [C:oracleproduct10.1.0Db_1binoci.dll], position [2147483647], 
        in [reg: SoftwareOracleKEY_OraDb10g_home1]
    Checking Oracle Home at key [SoftwareOracleKEY_XE] ...
      Warning: bin folder [E:oraclexeapporacleproduct10.2.0serverbin] is not in PATH
    Not found !
Home = C:oracleproduct10.1.0Db_1
Version = 1001000200
OCI DLL name = C:oracleproduct10.1.0Db_1Binoraclient10.dll
TNSNAMES dir = C:oracleproduct10.1.0Db_1NetworkAdmintnsnames.ora
NLS_LANG = AMERICAN_AMERICA.CL8MSWIN1251
================================
Session info
================================
Checking session ...
  Warning: The client version [10.1.0.2.0 Production] with low minor version may 
    be unstable.
Current catalog = 
Current schema = ADDEMO
Server ver = Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
Use DBA views = False
Decimal sep = .
Character set name = CL8MSWIN1251
Database bytes/char = 3

Note the lines with "Warning:". We going to extend the reporting, when we will get additional information about potential issues.

Default field formats

The customers were asking us to implement the options, allowing to control the default field formats. IOW, to set DisplayFormat property for the TField descendant classes. We implemented TADFormatOptions properties:

 

  • FmtDisplayDate to set TDateField.DisplayFormat;
  • FmtDisplayTime to set TTimeField.DisplayFormat;
  • FmtDisplayDateTime to set TDateTimeField.DisplayFormat or TSQLTimeStampField.DisplayFormat;
  • FmtDisplayNumeric to set TNumericField.DisplayFormat;
  • FmtEditNumeric to set TNumericField.EditFormat.
Add Comments