Jump to content

[SOLVED] php with access


Recommended Posts

i want to insert data from php to microsoft access ,but i got warning..

 

 

its the error that i got

 

PHP Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in C:\Inetpub\wwwroot\php\test.php on line 8 .

 

and its the code:

 

<?php

$conn=odbc_connect('test','root','');

if($conn)

{

echo "connect";

}

$sql="insert into t1 values(1,'emmy')";

odbc_exec($conn,$sql);

?>

hi all...

 

PHP Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in C:\Inetpub\wwwroot\php\test.php on line 9

 

<?php

$conn=odbc_connect('test1','','');

if($conn)

{

echo "connect";

}

 

$sql="insert into t1 values(10,'meme')";

odbc_exec($conn,$sql);

 

?>

 

in fraction i solved the problem,when i make share of the folder that contain the access database...

its work well....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.