austine_power007 Posted November 28, 2006 Share Posted November 28, 2006 [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 More sharing options...
gin Posted November 28, 2006 Share Posted November 28, 2006 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? Link to comment https://forums.phpfreaks.com/topic/28706-sql-error/#findComment-131412 Share on other sites More sharing options...
btherl Posted November 28, 2006 Share Posted November 28, 2006 From Google: http://support.microsoft.com/kb/175168Searching for the string "Operation must use an updateable query" will give you many other helpful results too. Link to comment https://forums.phpfreaks.com/topic/28706-sql-error/#findComment-131413 Share on other sites More sharing options...
austine_power007 Posted November 28, 2006 Author Share Posted November 28, 2006 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.