Re: PHP4 with Access/Paradox tables through ODBC : insert failes

From: Date: Mon, 26 Jun 2000 17:35:03 +0000
Subject: Re: PHP4 with Access/Paradox tables through ODBC : insert failes
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-631@lists.php.net to get a copy of this message
Just a guess...do you have a primary key defined for the table in Paradox/Access? Though it's been a very long time since I've used ODBC/Access, I remember having similar problems when trying to do things with a table that didn't have a primary key defined. Doug Thibault Dangréaux was heard at 05:12 PM 6/26/00 +0200 to say: >Greetings > >I use PHP4 (under Windows 2000) with an ODBC database (Paradox files, but I >made a test with Access too). SELECT works without troubles, but I get an >error with both DELETE and INSERT : > >(both translated, ODBC talks to me in French ;-) >Warning: SQL error: [Microsoft][ODBC Paradox Driver] Reserved Error >(-5016); no message assigned to this error., SQL state S1000 in >SQLExecDirect in e:\inetpub\wwwroot\WebCenter\add_user.php on line 30 >INSERT INTO User (Login,Password,IsAdmin,IsOperator,IsUser) VALUES >('truc','chose',1,1,1) > >with Access : >Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The operation >must use a query which can be updated., SQL state S1000 in >SQLExecDirect in e:\inetpub\wwwroot\WebCenter\add_user.php on line 30 >INSERT INTO UserList (Login,Password,IsAdmin,IsOperator,IsUser) VALUES >('toto','toto',0,0,1) > >No problem if I directly access the "DB" in SQL (with Borland Database >Explorer)... >The same code works if I replace Access/Paradox with a "real" database >(MS-SQL 7), but I would rather stick to Paradox, since I don't need a >particularly fast DB, and it is free under Windows (which isn't the case >with MySQL). > >Any help on this? > >Thanks > >Thibault Dangréaux

« previous php.db (#631) next »