Jump to content

SQL error


austine_power007

Recommended Posts

[size=10pt]I am getting this error when inserting data into MS ACCESS 2003 via PHP my code:
This is line 15:
[code]$query = odbc_exec($odbc, "INSERT INTO task(dev_name,title,start_date,est_end_date,actual_end_date,complete,remark,supervisor) VALUES ('$dev_name','$job_ttl','$start_dat','$est_dat','$act_end',$comp,'$remark','$sup')") or die ("Wrong data");[/code]

ERROR:

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in c:\inetpub\wwwroot\flash\sub_dev_data.php on line 15[/size]
Link to comment
https://forums.phpfreaks.com/topic/28706-sql-error/
Share on other sites

I made a primar[quote author=gin link=topic=116551.msg474941#msg474941 date=1164693745]
Since I'm not familiar with MS access, this is just a guess, but is one of the fields set as a primary key? And if so, does the entry you just input already exist?
[/quote]
I made a primary key as "Auto Update". so i didn't give any input to tht.
Link to comment
https://forums.phpfreaks.com/topic/28706-sql-error/#findComment-131418
Share on other sites

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.