Jump to content

[SOLVED] ODBC Connect issue


scottybwoy

Recommended Posts

Hi All,

 

Not posted in here for a while, and should probably post it in another section, but this forum is fast and the one of the best I know, well done everyone.

 

Well back to my issue.  I'm trying to connect to MSSQL Server 2005 using this code:

<?php
$dbh = odbc_connect("mri.local.mri-server", "user", "pass");
?>

 

And get this error :

 

PHP 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 D:\Inetpub\wwwroot\testing\classes\template.inc on line 105

 

Is there any additional things I need to install or do?

 

The php manual suggests that it requires additional libraries to be installed, but doesn't specify.  Any pointers?

Link to comment
https://forums.phpfreaks.com/topic/67422-solved-odbc-connect-issue/
Share on other sites

lol, i have been using mssql and it's functions for about a yr now, it is uncommented.  But I want to use this odbc function to retrieve a list of tables in the db.

 

How am I meant to call the dns.  I have tried IP @ddy, domain.fqns_servername and localhost,port all return the same error.

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.