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

Link to comment
Share on other sites

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.