|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Problem in Insert statement for PHP-MSAccess
Hi,
Previously...I had a problem with PHP - Access database connection. Now its working. I have one question. In my table I have one column which is autoincrement. I am trying to insert a row through PHP. my line of code is somewhat like this. <? // connection stuff is working fine... $query = "insert into Mfg_Units values(' ','G888','Testing')"; $result = odbc_exec($connect,$query) or die(" ".odbc_errormsg()); ?> it gives me this error.. [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. I tried everything. But i guess the problem is due to autoincrement number. does anybody have any idea about this..? |
|
#2
|
||||
|
||||
|
I also use a table with a column-key which autoincrements. I solved the problem specifying only the values I wanted to define. Try to insert the row by using a SQL query like this one:
$query = "INSERT INTO People (FirstName, LastName, PhoneNumber) VALUES ('$FirstName', '$LastName', '$PhoneNumber')"; Bye, Dave |
|
#3
|
|||
|
|||
|
Hi...when I tried that way..I got this error,
[Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same. ??????? |
|
#4
|
|||
|
|||
|
hey...OK..
I worked it out. I got the problem..and I corrected it. |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Problem in Insert statement for PHP-MSAccess |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|