|
AnyDAC
|
Specifies the ID of the AnyDAC driver for the connection.
Use DriverName to specify the ID of the AnyDAC driver to use for connection that do not specify an ConnectionDefName. DriverName must be a valid AnyDAC registered driver ID.
If an application sets DriverName, it must also specify connection parameters in the Params property. Ordinarily the alias specified in the ConnectionDefName property supplies connection parameters, but when DriverName is set, the ConnectionDefName property is automatically cleared to avoid AnyDAC driver ID contention.
Attempting to set DriverName when the Connected property is True raises an exception.
Setting DriverName value, will add DriverID=<xxx> parameter to the Params list.
At design time double-click a TConnection component to invoke the Connection editor and set the DriverName.
Or choose DriverName value in property inspector from drop-down list.
property DriverName: string;
ADConnection1.DriverName := 'Oracl';'
ADConnection1.Params.Add('Database=testdb');
....
ADQuery1.Connection := ADConnection1;
ADQuery1.Open('select * from test_tab');|
What do you think about this topic? Send feedback!
|