I try to insert a new line in a access97 database with odbc. (simple table with nom and prenom in fields)
I used this code :
<%
$connectString ="phpbase";
$connection = odbc_connect($connectString, "", "")
$nom1="phil";
$prenom1="Beaushilom";
$requete = "INSERT INTO noms (nom, prenom) VALUES ('$nom1','$prenom1')";
print("$requete <br>");
$result = odbc_exec($connection, $requete);
%>
But I have the error msg :
Warning: SQL error: [Microsoft][ODBC Microsoft Access 97 Driver] Operation must use an updatable query., SQL state S1000 in SQLExecDirect in Z:\php\testphp.php on line 15
I don't know why. I have the good rights for writing on the database file.
Thanks a lot
Junior
I used this code :
<%
$connectString ="phpbase";
$connection = odbc_connect($connectString, "", "")
$nom1="phil";
$prenom1="Beaushilom";
$requete = "INSERT INTO noms (nom, prenom) VALUES ('$nom1','$prenom1')";
print("$requete <br>");
$result = odbc_exec($connection, $requete);
%>
But I have the error msg :
Warning: SQL error: [Microsoft][ODBC Microsoft Access 97 Driver] Operation must use an updatable query., SQL state S1000 in SQLExecDirect in Z:\php\testphp.php on line 15
I don't know why. I have the good rights for writing on the database file.
Thanks a lot
Junior