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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.