Jump to content

odbc_connect SQL:Error. Why ?


iPixel

Recommended Posts

Here's my connection string.

 

error_reporting(E_ALL);
ini_set('display_errors', '1');

$conn=odbc_connect('servicename','username','password');

if(!$conn)
{ echo "You Failed to Connect"; }
else	
{ echo "Successfuly Connected to Oracle through ODBC"; }

 

and here is my error :

 

Warning: odbc_connect() [function.odbc-connect]: SQL error: Specified driver could not be loaded due to system error 5 (Oracle in OraHome92)., SQL state IM003 in SQLConnect in C:\Inetpub\wwwroot\website\connect.php on line 8

 

You Failed to Connect

 

 

OK I FIXED that error... it was a read & execute permissions thing. But now i get.

 

Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed, SQL state IM004 in SQLConnect in C:\Inetpub\wwwroot\website\connect.php on line 8

You Failed to Connect

 

Any idea why im getting this error? Im in a bind and need this to work asap.

 

Great thanks to all who help.

Link to comment
https://forums.phpfreaks.com/topic/160814-odbc_connect-sqlerror-why/
Share on other sites

One error after another... now im at

 

Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\Inetpub\wwwroot\website\connect.php on line 8

You Failed to Connect

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.