Can someone please advise what I'm doing wrong. I'm try to access a ms access database, and I'm getting an error message.
The following is the crap I wrote. I'm using php3.
<?php
$db = ODBC_Connect("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=G:\inetpub\wwwroot\PHP\php.mdb","","");
$res = ODBC_Exec($db, "SELECT Name FROM user");
while (ODBC_Fetch_Row($res)) {
echo "<P>".ODBC_Result($res, 'Name')."</P>";
}
?>
Heres the error:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length, SQL state S1090 in SQLConnect in G:\Inetpub\wwwroot\PHP\db.php3 on line 37
Warning: Supplied argument is not a valid ODBC-Link resource in G:\Inetpub\wwwroot\PHP\db.php3 on line 38
Warning: Supplied argument is not a valid ODBC result resource in G:\Inetpub\wwwroot\PHP\db.php3 on line 39
The following is the crap I wrote. I'm using php3.
<?php
$db = ODBC_Connect("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=G:\inetpub\wwwroot\PHP\php.mdb","","");
$res = ODBC_Exec($db, "SELECT Name FROM user");
while (ODBC_Fetch_Row($res)) {
echo "<P>".ODBC_Result($res, 'Name')."</P>";
}
?>
Heres the error:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length, SQL state S1090 in SQLConnect in G:\Inetpub\wwwroot\PHP\db.php3 on line 37
Warning: Supplied argument is not a valid ODBC-Link resource in G:\Inetpub\wwwroot\PHP\db.php3 on line 38
Warning: Supplied argument is not a valid ODBC result resource in G:\Inetpub\wwwroot\PHP\db.php3 on line 39