Help! LoadParamsFromIniFile(MyInIFile) does not set the DriverName!


2007-04-12 10:16:59 AM
delphi76
Hello,
D2007 - dbExpress - MS SQL
I am using named connections with a custom ini file and at runtime I set the
TSQLConnection.ConnectionName and then call
LoadParamsFromIniFile(MyIniFile). This should automatically set the driver
name with the params are loaded, however, when tracing through the
SqlExp.pas the DriverName does not even get set from the Params after they
are loaded.
function SetDriverName never gets called so the following never get loaded
either:
FVendorLib := Trim(GetProfileString(FDriverName, VENDORLIB_KEY,
DriverRegistryFile));
FLibraryName := Trim(GetProfileString(FDriverName, DLLLIB_KEY,
DriverRegistryFile));
FGetDriverFunc := Trim(GetProfileString(FDriverName,
GETDRIVERFUNC_KEY, DriverRegistryFile));
From the Help:
If you are using named connections, the DriverName property is automatically
set when you set the ConnectionName property.
TIA,
- Craig