Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2005
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ODBC / MsAccess / php

    I am having trouble retreiving a field that has a space

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

    example:

    Code:
    while(odbc_fetch_row($table)){ 
    
    $status = odbc_result($table, "status");
    $date = odbc_result($table, "Date");
    $origpn = odbc_result($table, "Part Number");
    this being the problem
    Code:
    $origpn = odbc_result($table, "Part Number");
    Any suggestions? It is not an option to change the field name.
    Last edited by eksob; 01-03-2006 at 08:27 PM.

  • #2
    New Coder
    Join Date
    Dec 2005
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Taken from PHP.net commentary

    spooky
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •