Driver could not be properly initialized

Driver could not be properly initialized

Postby EderWillian » Fri 20 Jan 2012 13:16

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');
EderWillian
 
Posts: 12
Joined: Tue 21 Aug 2007 14:25

Postby AndreyZ » Mon 23 Jan 2012 11:36

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.
AndreyZ
 

Postby EderWillian » Thu 02 Feb 2012 18:08

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
EderWillian
 
Posts: 12
Joined: Tue 21 Aug 2007 14:25

Postby AndreyZ » Mon 06 Feb 2012 11:13

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.
AndreyZ
 

Postby EderWillian » Mon 06 Feb 2012 17:26

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
EderWillian
 
Posts: 12
Joined: Tue 21 Aug 2007 14:25

Postby AndreyZ » Tue 07 Feb 2012 08:32

Please check if the problem perists with the latest dbExpress driver for SQL Server version 5.0.2 . If it persists, please send your project to andreyz*devart*com .
AndreyZ
 

Postby EderWillian » Fri 10 Feb 2012 11:29

Problem solved.

I'd some mistake in the driver's initialization.

Thank you
EderWillian
 
Posts: 12
Joined: Tue 21 Aug 2007 14:25

Postby AndreyZ » Fri 10 Feb 2012 12:01

It's good to see that the problem was solved. If any other questions come up, please contact us.
AndreyZ
 


Return to dbExpress driver for SQL Server