Driver could not be properly initialized
-
- Posts: 12
- Joined: Tue 21 Aug 2007 14:25
Driver could not be properly initialized
Hi,
I'm trying to deploy and executable with Dephi XE and dbexpress driver and an error ocurred: "DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path."
I put the dbxmss.dll, dbexpsda40.dll in the working directory, but the , but the error persists:
My connection options are
SQLConn.GetDriverFunc := 'getSQLDriverSQLServer';
SQLConn.LibraryName := 'dbexpsda40.dll';
SQLConn.VendorLib := 'sqloledb.dll';
Params.Add('HostName=' + aParametros.Server);
Params.Add('DataBase=' + aParametros.DataBase);
Params.Add('MaxBlobSize=-1');
Params.Add('LocaleCode=0000');
Params.Add('IsolationLevel=ReadCommitted');
Params.Add('OSAuthentication=False');
Params.Add('PrepareSQL=False');
Params.Add('BlobSize=-1');
Params.Add('ErrorResourceFile=');
Params.Add('OS Authentication=False');
Params.Add('Prepare SQL=False');
I'm trying to deploy and executable with Dephi XE and dbexpress driver and an error ocurred: "DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path."
I put the dbxmss.dll, dbexpsda40.dll in the working directory, but the , but the error persists:
My connection options are
SQLConn.GetDriverFunc := 'getSQLDriverSQLServer';
SQLConn.LibraryName := 'dbexpsda40.dll';
SQLConn.VendorLib := 'sqloledb.dll';
Params.Add('HostName=' + aParametros.Server);
Params.Add('DataBase=' + aParametros.DataBase);
Params.Add('MaxBlobSize=-1');
Params.Add('LocaleCode=0000');
Params.Add('IsolationLevel=ReadCommitted');
Params.Add('OSAuthentication=False');
Params.Add('PrepareSQL=False');
Params.Add('BlobSize=-1');
Params.Add('ErrorResourceFile=');
Params.Add('OS Authentication=False');
Params.Add('Prepare SQL=False');
Hello,
Our dbExpress driver for SQL Server doesn't need the dbxmss.dll library, it is needed only by the standard dbExpress driver. Sometimes, the "DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path." error occurs because there was no call of the CoInitialize and CoUninitialize functions. For more information about this, please read the following topic: http://docwiki.embarcadero.com/RADStudi ... nformation . To solve the problem in this case, you should call the CoInitialize and CoUnInitialize functions in your code. Note that to use the CoInitialize and CoUnInitialize functions, you should add the ActiveX unit to the USES clause of your unit. Also, please check that 32-bit sqloledb.dll library is available on the computer where you are trying to deploy your application.
Our dbExpress driver for SQL Server doesn't need the dbxmss.dll library, it is needed only by the standard dbExpress driver. Sometimes, the "DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path." error occurs because there was no call of the CoInitialize and CoUninitialize functions. For more information about this, please read the following topic: http://docwiki.embarcadero.com/RADStudi ... nformation . To solve the problem in this case, you should call the CoInitialize and CoUnInitialize functions in your code. Note that to use the CoInitialize and CoUnInitialize functions, you should add the ActiveX unit to the USES clause of your unit. Also, please check that 32-bit sqloledb.dll library is available on the computer where you are trying to deploy your application.
-
- Posts: 12
- Joined: Tue 21 Aug 2007 14:25
Hi AndreyZ
I delay to respond, because I'm doing more tests before ask again.
No mather what I do! If the Sql Native Client 2008 arent' installed, I cannot connect. The error always are "DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path." .
Can you send me the demo code to connect to a MSSQL 2008/2005 without the Sql Native Client ?
Thank you for help
I delay to respond, because I'm doing more tests before ask again.
No mather what I do! If the Sql Native Client 2008 arent' installed, I cannot connect. The error always are "DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path." .
Can you send me the demo code to connect to a MSSQL 2008/2005 without the Sql Native Client ?
Thank you for help
It seems that the OLE DB provider is not correctly installed or registered on your computer. Please check that you have the sqloledb.dll library on your computer (it must be in the "C:\Program Files\Common Files\System\Ole DB" directory). If you have it, please try registering it in the following way:
- click the Windows Start button and select the Run menu;
- type "CMD" in the Run dialog form and press the Enter button;
- type "regsvr32 sqloledb.dll" and press the Enter button.
- click the Windows Start button and select the Run menu;
- type "CMD" in the Run dialog form and press the Enter button;
- type "regsvr32 sqloledb.dll" and press the Enter button.
-
- Posts: 12
- Joined: Tue 21 Aug 2007 14:25
Hi,
Yes, the Ole DB is correctly installed, because on the previous Delphi 7 compilation, the access sucess.
The only way to connect is installing the sql 2008 native client.
I think this is a problem, because i had more than 3k computers on differente customers to install these package.!
If you want, I can send you an simple project reproducing the problem.
best reghards.
Eder
Yes, the Ole DB is correctly installed, because on the previous Delphi 7 compilation, the access sucess.
The only way to connect is installing the sql 2008 native client.
I think this is a problem, because i had more than 3k computers on differente customers to install these package.!
If you want, I can send you an simple project reproducing the problem.
best reghards.
Eder
-
- Posts: 12
- Joined: Tue 21 Aug 2007 14:25