Jump to content

Recommended Posts

Hello,

 

i have been trying for a few hours to get the following example to work.

 

$conn  =  odbc_connect('northwind','',''  );

 

if  ($conn  <=  0)  {

     echo  "<P>Error  in  connection";

     exit($conn);

} else  {

     echo  "<P>Connection  successful\n";

};

 

The error message that comes up is

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:\Program Files\Apache Software Foundation\Apache2.2\htdocs\odbc2.php on line 12

 

Then Error in connection

I have registered an ODBC database under both (at different times) USER and SYSTEM DSN's. I have tried writing different code for different database examples I've been trying to get working. The ODBC connection are working, i have download a small program utility to test them out (Microsoft ODBC Test), so no problem there.

 

I have 2 network cards(? is this a problem?), running under Apache 2.2.9 and PHP 5.2.6 fresh installs.

 

I spent a more then a few hours looking at this problem ???, i have no other ideas. So any ideas and a hopefully a working solution would be greatly appreciated.

 

Thanks Paul

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.