Results 1 to 5 of 5

Thread: SQL Error *** RESOLVED ***

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    South Wales (UK)
    Posts
    83

    SQL Error *** RESOLVED ***

    I've got a PHP application which reads and updates an MS Access database using odbc and all is working fine. Then when I do a compact and repaire on the database and re-run my php application I get the following sql error:

    'Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver]
    Operation must use an updateable query., SQL state S1000 in
    SQLExecDirect in c:\inetpub\wwwroot\specac\ppc\home.php on
    line 20"

    But when I revert back to the dbase before the repair everything's fine again. Has anyone ever come across this before.

    Hope someone can help
    Last edited by aaronskw; Jul 22nd, 2004 at 09:04 AM.

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    what are line 18-23?

    also it sounds like you repair messed up your table.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    South Wales (UK)
    Posts
    83
    PHP Code:
    $Key time();
    //echo "Key $Key";
    $result2 odbc_do ($con"UPDATE Users SET Key='$Key' WHERE UserID=".$row[1].""); 
    This works fine apart from after a compact and repair. Also, this only happens on my XP pro machine but on our Win 2000 Server machine I don't get any errors after a compact and repair. Could it be the odbc access drivers on XP. What do you think?

    I'm getting really weird php problems ain't I? I'm starting to think php doesn't like me.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    South Wales (UK)
    Posts
    83
    After months and months I finally tracked this problem down to the Windows Security settings on the database. Arrrggghh.

  5. #5
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Do yourself a favor and use something that doesn't need to be "compacted and repaired" all the time.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

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



Click Here to Expand Forum to Full Width