09.01.2013 Views

RAD Studio for Microsoft .NET - Embarcadero Technologies

RAD Studio for Microsoft .NET - Embarcadero Technologies

RAD Studio for Microsoft .NET - Embarcadero Technologies

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.1 Developing Database Applications with <strong>RAD</strong> <strong>Studio</strong> <strong>for</strong> <strong>Microsoft</strong> .<strong>NET</strong> dbExpress Framework Compatibility<br />

used by the dbExpress 4 driver loader to instantiate driver loader classes by name (a String). The ClassRegistry is a simple,<br />

lightweight mechanism <strong>for</strong> registering and instantiating a class by name.<br />

DBXDynalink Drivers<br />

DBXDynalink is used <strong>for</strong> existing dbExpress 3 drivers as well as new drivers. It is compiled as a native Delphi package or as a<br />

managed .<strong>NET</strong> assembly. DBXDynalink loads native dbExpress drivers that implement a more primitive "native" interface called<br />

DBXExports. The DBXExports interface is a small collection of "flat" export methods. DBXExports's source is included with<br />

dbExpress. DBXExports provides a more strongly typed API than the dbExpress 3's COM based interface. This allows methods<br />

to be added in future product generations without breaking compatibility with older implementations of the DBXExports interface.<br />

DBXAdapter is a dbExpress 4 compliant driver that adapts the DBXExports interface to the older dbExpress 3 COM interface.<br />

Newer native drivers can be written by implementing DBXExports directly.<br />

Because the DBXExports interface is designed to be implemented using any native language (Delphi or C++), it uses more<br />

primitive, non-exception based error handling. DBXDynalink maps error codes to a DBXCommon exception.<br />

The DBXDynalink unit contains a dbExpress 4 driver. This driver delegates to non-Delphi drivers that implement the<br />

DBXDynalinkExport flat export interface. DBXTrace is a delegate driver used <strong>for</strong> tracing. The dbExpress VCL uses<br />

DBXCommon, DBXDynalink and DbxTrace as "default" drivers. However, this can be changed <strong>for</strong> statically linked applications<br />

without modifying dbExpress VCL source code (SQLExpr.pas). SQLExpr.pas uses the unit DBXDefaultDrivers. The<br />

DBXDefaultDrivers unit only contains a uses clause. The DBXDefaultDrivers uses clause contains DBXCommon, DBXDynalink,<br />

and DBXTrace. DBXCommon must always be used. However, a statically linked application could remove DBXTrace and<br />

replace DBXDynalink with a different driver.<br />

DBXDirect Drivers<br />

A DBXDirect driver is any driver that is implemented by extending the DBXCommon abstract base classes. These classes are<br />

written in Delphi <strong>for</strong> native implementations. For managed implementations, they can be written using any CLR compatible<br />

language such as Delphi, C#, or Visual Basic.<strong>NET</strong>.<br />

Strictly speaking, all DBX framework drivers are a <strong>for</strong>m of DBXDirect driver. However DBXDynalink and DBXRemote provide a<br />

more "indirect" linkage to driver implementations.<br />

See Also<br />

dbExpress Framework Compatibility ( see page 31)<br />

Deploying dbExpress Database Applications<br />

1.1.12 dbExpress Framework Compatibility<br />

Some dbExpress software developed prior to the dbExpress driver framework (DBX driver framework) has been modified to<br />

work with the DBX driver framework. As a result of these changes, some compatibility issues arise.<br />

General<br />

dbExpress 2.5 drivers cannot be used with the DBX framework.<br />

The dbExpress framework does not provide 100% compatibility with dbExpress 3.<br />

dbExpress 3 drivers can be used with the DBX framework. The DBX framework driver loader automatically detects dbExpress 3<br />

drivers and uses the DBXAdapter driver (dbxadapter30.dll) to make a dbExpress 3 driver look like a dbExpress 4 driver.<br />

Here is a list of known compatibility issues:<br />

• Static driver linkage. You cannot statically link dbExpress drivers into an executable.<br />

• SqlExpr.TSQLConnection provided protected access to the Connection member that was of type TISQLConnection only in<br />

31<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!