Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sqlstate 00000 help!!

Status
Not open for further replies.

PaulFynch

IS-IT--Management
May 23, 2002
105
CA
hey everyone....
here is the code..

<html>

<head>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1252&quot;>
<meta name=&quot;GENERATOR&quot; content=&quot;Microsoft FrontPage 4.0&quot;>
<meta name=&quot;ProgId&quot; content=&quot;FrontPage.Editor.Document&quot;>
<title>php_access database</title>
</head>

<body>

This is the output from the database

<?

$connect = odbc_connect(&quot;kfvc&quot;, &quot;&quot;, &quot;&quot;);
<<<line 16
$query = &quot;SELECT user FROM test&quot;;
$result = odbc_exec($connect, $query);

while(odbc_fetch_row($result)){
$user = odbc_result($result, 1);
print(&quot;$user \n&quot;);
}

odbc_close($connect);
?>
<p>

</body>

this is the error the page returns....

Warning: SQL error: , SQL state 00000 in SQLConnect in c:\inetpub\ on line 16



and i think i have tried everything...bear with me
any help would be sooo appreciated
Paul
 
Is PHP compiled with odbc support? ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I doubt that's it. If it were, wouldn't he get a &quot;function undefined&quot; error?

What kind of ODBC resource are you trying to connect to?

______________________________________________________________________
TANSTAAFL!
 
i am using php4 i believe, so the odbc support is built in, also, i am running WinXP pro and the built-in odbc manager. The driver I am trying to connect to is for a MSAccess database.

thx in advance
paul
 
Just because you're using php4 does not mean ODBC support is built in. phpinfo() can tell you for sure.

I am assuming that the DSN &quot;kfvc&quot; exists, and that there are no permission problems on the file, either at the filesystem level or with Access' internal password system.

Also, are you sure you have correctly identified line 16? ______________________________________________________________________
TANSTAAFL!
 
hey, i do have the odbc support built in.
but.....i switched from IIS to Apache web server, and all works great....thanks for your help anyway!!
paul
 
I'd recommend that switch just on general principles. ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top