Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Operation must use an updateable query.'

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US

Code:
-2147467259
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.


that is the error I get when I Try to add an entry to a database on my have on website.

I am using a DSN-less connection
"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=D:\
I even moved the mdb to a folder which I Was absolutly sure I had write permision to.

this is the sniplet of code.

Code:
on error resume next
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Mode = 3
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=D:\[URL unfurl="true"]WWWRoot\kb244com\www\_private\database\SiteDb.mdb;",[/URL] "", ""
		
InsertStr = "Insert into QA (Asker, Question, DateInfo, Email, Answer, Extra) values ('"
InsertStr = InsertStr & Request.Form("Asker") & "','" & Request.Form("Question") & "','" & Date() & "','" & Request.Form("Email") & "', '', '')"
InsertStr = replace(InsertStr, vbcrlf, &quot;<br>&quot;)
	
Conn.Execute InsertStr
	
if err.number <> 0 then
	Response.Write &quot;<center><font color=red>An error has occured during your submission</font></center><br>&quot; & vbcrlf
	Response.Write err.number & &quot;<br>&quot; & vbcrlf
	Response.Write err.description & &quot;<br>&quot; & vbcrlf
	Response.Write &quot;Please contact kb244 with this information at <a href=&quot;&quot;admin@kb244.com&quot;&quot;>admin@kb244.com</a>&quot;
else
	Response.Write &quot;<center>Question sumited without a problem</center>&quot;
end if
if not Conn is nothing then Conn.Close

in the Database
the Table QA

consist of
Code:
QAID     - AutoNumber
Asker    - Text
Question - Memo
Answer   - Memo  (with can be zero length turned on)
Date     - Text
Extra    - Text  (with can be zero length turned on)
Email    - Text


I know the path is correct, because I can read from the database in the same manner, and using '3' also has Read/Write turned on.

But cant figure out why I Cant get it to add a record.

this is an example of the Query string (which I had Response.write to the screen for debugging)

Code:
<!-- Insert into QA (Asker, Question, DateInfo, Email, Answer, Extra) values ('Karl','This is my question','4/10/2001','test@test.com', '', '') -->
Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
My hosting provider set the proper permisions I needed to the _private folder, and it works now. (they probally turned on execute permision, not really sure, could not have been just write, because /Mail/attachment had write, and it didnt work) Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
Hello KB,

Usually the problem lies with the ACL, make sure that ISUR_<Computer Name> as access to read/write to the file, if you are hosting the database offsite, check with the administrators there, usually that solves the problem. Good luck

Gordon R. Durgha
gd@vslink.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top