Re: ODBC Failures
| From: | Richard Lynch | Date: | Mon, 01 Jul 2002 23:18:23 +0000 |
| Subject: | Re: ODBC Failures | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-104812@lists.php.net to get a copy of this message | ||
>List,
> My ODBC connection is failing it seems...I can run this code just
>fine...odbc_connect and odbc_pconnect seem to work...the odbc_prepare
>even works just fine...but as soon as I execute (with odbc_execute,
>odbc_exec, or odbc_do it fails...any ideas?
>
><?php
>
>$db = odbc_pconnect("Desire","sa", "xxxxxxxx");
>echo "Database Connection:".$db."<br>";
>$sql = odbc_prepare($db, "execute spGetItems");
>echo "Prepared SQL id:".$sql."<br>";
>// This line will fail
>$rs = odbc_execute($sql);
>
>?>
>
Is there an odbc_error() function that will maybe clue you in to what's
wrong?...
$rs = odbc_execute($sql) or error_log(odbc_error());
I dunno what the function name is, but I'll get a dollar it's listed here:
http://php.net/odbc
--
Like Music? http://l-i-e.com/artists.htm