I'm having problems simply connecting to my ODBC dsn's.
I've setup the DSN as a system DSN, and I can connect to it fine using Throroughbred ODBC Query, however, trying to connect to it using php gives me errors. Here's my small little connectivity script:
<?php
$dbcnx = odbc_connect('dsn=grossmargin;','','');
if (!$dbcnx) {
echo ("<p>Unable to connect to the " .
"database server at this time.</p>");
exit();
}
?>
This is the error it pumps out:
Warning: 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 group\apache\htdocs\blah.php on line 2
So, what I'm wondering is, do I have to specify what driver to use to connect to the database? I thought that would be handled by the entry in the system DSN's, but perhaps I'm wrong.
I'm using WinXP Pro and Apache.
Any help would be appreciated.