View Full Version : ODBC / MsAccess / php

01-03-2006, 07:19 PM
I am having trouble retreiving a field that has a space

Warning: odbc_result(): supplied argument is not a valid ODBC result resource



$status = odbc_result($table, "status");
$date = odbc_result($table, "Date");
$origpn = odbc_result($table, "Part Number");

this being the problem

$origpn = odbc_result($table, "Part Number");

Any suggestions? It is not an option to change the field name.

01-03-2006, 11:42 PM
Taken from PHP.net commentary (http://www.php.net/odbc_result)

14-Mar-2003 12:27
It took me a while to find out why there was a problem with retrieving data with odbc_result statement.

Warning: SQL error: [Microsoft][ODBC SQL Server Driver]
SQL state S1002 in SQLGetData

State S1002 means that invalid column index has been used.
I checked it hundred times - column index was OK.

Finally i ordered calls of odbc_result statement according to order of fields in the table. It helped.

Best regards

see if that will help you

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum