#11571 [Com]: cannot insert data in msaccess
| From: | yangliu89 at yahoo dot com | Date: | Tue, 01 Oct 2002 22:13:46 +0000 |
| Subject: | #11571 [Com]: cannot insert data in msaccess | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-21173@lists.php.net to get a copy of this message | ||
ID: 11571
Comment by: yangliu89@yahoo.com
Reported By: sugus_24@yahoo.com
Status: Closed
Bug Type: ODBC related
Operating System: w2k
PHP Version: 4.0.5
New Comment:
I experienced the same problem, my coding is almost the same as yours.
Just wonder if you ever found out the solution.
Previous Comments:
------------------------------------------------------------------------
[2001-07-06 10:39:27] kalowsky@php.net
no user feedback.
------------------------------------------------------------------------
[2001-06-21 11:11:58] kalowsky@php.net
script works fine for me. are you sure you haven't given out your DSN
in read only mode, or possibly requiring a user?
------------------------------------------------------------------------
[2001-06-20 00:51:30] sugus_24@yahoo.com
hello.
my script is :
-----------------------------
<?
/* connect database */
$dsn = "nawa_dsn";
$user = "";
$pw = "";
$conn = odbc_connect($dsn,$user,$pw);
$sql = "insert into TB_Login (UserID,Name) values
('002','Somphob')";
/* check for errors */
if (!odbc_exec($conn,$sql)) {
/* error */
echo "Error";
}
else {
echo "OK!";
}
/* close connection */
odbc_close($conn);
?>
-----------------------------
and result is :
-----------------------------
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation
must use an updateable query., SQL state S1000 in SQLExecDirect in
c:\inetpub\wwwroot\customer\save.php on line 12
Error
-----------------------------
please tell me. thank.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=11571&edit=1