chenault68
asked on
odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
I have a client that is running PHP script to update some pricing and item descriptions in an SQL database. Since we moved the Access database to a new server, we have been having problems. I have completely redone the ODBC for this app and all the other components are working except this one. I can't imagine anything else has changed that would cause this error. It was working fine before we moved the database and once we re-established the ODBC all other components of this web frontend are working except this one.
Error Message:
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect in C:\wamp\www\ItemUpdate\Upd ateItemDes criptions. php on line 113
Code:starting at line 112; $connect1 is defined earlier in the code and seems to work in the other PHP script
$query1 = "SELECT RefNum,SHORT_DESCRIPTION FROM AllPrices ORDER BY RefNum";
$result1 = odbc_exec($connect1,$query 1);
$itemcount=0;
while (odbc_fetch_row($result1)) {
//put the data into an array; we'll pop the data later if it is the same in the Inventory system
$itemref = odbc_result($result1,"RefN um");
$itemdesc = odbc_result($result1,"SHOR T_DESCRIPT ION");
$pbArray[$itemref] = $itemdesc;
++$itemcount;
thanks for the help
Error Message:
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect in C:\wamp\www\ItemUpdate\Upd
Code:starting at line 112; $connect1 is defined earlier in the code and seems to work in the other PHP script
$query1 = "SELECT RefNum,SHORT_DESCRIPTION FROM AllPrices ORDER BY RefNum";
$result1 = odbc_exec($connect1,$query
$itemcount=0;
while (odbc_fetch_row($result1))
//put the data into an array; we'll pop the data later if it is the same in the Inventory system
$itemref = odbc_result($result1,"RefN
$itemdesc = odbc_result($result1,"SHOR
$pbArray[$itemref] = $itemdesc;
++$itemcount;
thanks for the help
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER