0
votes

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains the following unknown field name: 'ins'. Make sure you have typed the name correctly, and try the operation again., SQL state S0022 in SQLExecDirect in C:\xampp\htdocs\cit\con2.php on line 8

<?php 
$test='C:\xampp\htdocs\cit\con1.mdb';
$connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$test", "", "");
$txtroll=$_REQUEST['txtroll'];
$sql= "insert into inst(ID,ins) values (NULL,'$txtroll')";
$rs =   odbc_exec($connection, $sql);
?>
1
Have you checked the field ins is correct, also should there be a space after the table name?user849001
Are you sure Column/Field ins exists in the DB table?Jenson M John
yes sir the field 'ins' exists in the db tabletansh
I see that you have a later question here which seems to relate to the same table. If this question is no longer an outstanding issue then please consider deleting it.Gord Thompson

1 Answers

0
votes

I tested your code on my WAMP test box and I could recreate your issue. Your code inserted the new record without error.