PHP 4.0 Bug #4538: Error with odbc_exec and an Insert query
| From: | guillaume dot patry at netcourrier dot com | Date: | Mon, 22 May 2000 09:09:05 +0000 |
| Subject: | PHP 4.0 Bug #4538: Error with odbc_exec and an Insert query | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19164@lists.php.net to get a copy of this message | ||
From: guillaume.patry@netcourrier.com
Operating system: Windows2000 Pro
PHP version: 4.0 Release Candidate 1
PHP Bug Type: ODBC related
Bug description: Error with odbc_exec and an Insert query
my php script :
---------------
$idCon = odbc_connect("DataWeb","","", SQL_CUR_USE_ODBC);
$SQL_Insert = "INSERT INTO Users (name, firm, username, password, email) VALUES
('$nom', '$firm', '$login', '$pass',
'$mail')";
$AddPrepare = odbc_prepare($odbc, $SQL_Insert);
if ($AddPrepare) {
$QueryAdd = odbc_exec($odbc, $SQL_Insert);
odbc_commit($odbc);
}
else echo "Error on The Serveur <br>";
}
The Error Message :
-------------------
Warning: SQL error: [Microsoft][Pilote ODBC Microsoft Access] L'opération doit utiliser une
requête qui peut être mise à jour., SQL state S1000 in SQLExecute in
C:\Inetpub\wwwroot\php\register.php on line 123
Warning: SQL error: , SQL state 00000 in SQLExecute in C:\Inetpub\wwwroot\php\register.php on line
123
Configuration :
---------------
I use Windows2000 pro with php4 and IIS 5.
All the select queries works but the Insert Into dosen't work...
My php.ini file is OK, i don't have make any changes on it.