Search path for sqloledb.dll problems, wrong path
Posted: Thu 10 Oct 2013 11:48
Hi,
I have succesfully made a console application, connecting to a MSSQL 2012 Express, console application is named cgi.exe.
Wehn I use this cgi.exe as a cgi on an Apache server on Windows 7 64, the unmodified cgi.exe dosnt work - it returns:
"OLE DB error occured. Code 8000700Eh"
Tracking whats going on with "Process Monitor", the driver uses a different search path for sqloledb.dll when used as a cgi under Apache - file path looks like this in Process Monitor:
C:\Users\PC\ApacheServer\cgi-bin\%CommonProgramFiles(86)%\System\Ole DB\sqloledb.dll
.. and about 50 variants of the above, all extending the path with %CommonProgramFiles(86)%.
Trying to set a filepath to sqloledb.dll is ignored by the driver.
My init code looks like this in C++ Builder:
SQLConnection1->DriverName="DevartSQLServer";
SQLConnection1->GetDriverFunc = "getSQLDriverSQLServer";
SQLConnection1->VendorLib = "C:\\driver\\sqloledb.dll"; // attempt to set a path
// SQLConnection1->VendorLib = "sqloledb.dll"; // original
SQLConnection1->LibraryName = "dbexpsda40.dll";
Have now used all day, 12 hours, in the attempt to make this work - any help is very much appreciated.
I have succesfully made a console application, connecting to a MSSQL 2012 Express, console application is named cgi.exe.
Wehn I use this cgi.exe as a cgi on an Apache server on Windows 7 64, the unmodified cgi.exe dosnt work - it returns:
"OLE DB error occured. Code 8000700Eh"
Tracking whats going on with "Process Monitor", the driver uses a different search path for sqloledb.dll when used as a cgi under Apache - file path looks like this in Process Monitor:
C:\Users\PC\ApacheServer\cgi-bin\%CommonProgramFiles(86)%\System\Ole DB\sqloledb.dll
.. and about 50 variants of the above, all extending the path with %CommonProgramFiles(86)%.
Trying to set a filepath to sqloledb.dll is ignored by the driver.
My init code looks like this in C++ Builder:
SQLConnection1->DriverName="DevartSQLServer";
SQLConnection1->GetDriverFunc = "getSQLDriverSQLServer";
SQLConnection1->VendorLib = "C:\\driver\\sqloledb.dll"; // attempt to set a path
// SQLConnection1->VendorLib = "sqloledb.dll"; // original
SQLConnection1->LibraryName = "dbexpsda40.dll";
Have now used all day, 12 hours, in the attempt to make this work - any help is very much appreciated.