Operation must use an updateable query

R

rbutch

guys, this is pretty strange to me. im using access db as a back end.
as long as im in localhost/WebForm1.aspx im fine.
but if i put this on another pc, i get a "Operation must use an updateable query"
message when doing an insert. anything else works just fine.

if anyone has any ideas why this would work perfectly while running on the localhost, but not when its dropped into a virtual directory on another machine, please let me know.

Dim newDataRow As System.Data.DataRow
newDataRow = DsCustomer1.Customer.NewRow
newDataRow.Item("fname") = txtFirst.Text
newDataRow.Item("lname") = txtLast.Text
newDataRow.Item("address") = txtStreet.Text
newDataRow.Item("city") = txtCity.Text
newDataRow.Item("zip") = txtZip.Text
newDataRow.Item("social") = txtSocial.Text
DsCustomer1.Customer.Rows.Add(newDataRow)
daCustomer.Update(DsCustomer1)

thanks rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
R

rbutch

Never Mind i figured it out. it's all about the permissions
thanks
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
J

Juan T. Llibre

Usually, when you get the error
"Operation must use an updateable query"
when working with Access databases, it means
that the ASPNET ( IIS 5 ) or NETWORK SERVICE (IIS6)
account(s) don't have write permission to the directory
where the Access database resides.

Give the appropiate account write permission
to that directory, and your problem will go away.

The problem is that, for security, a .lck file has to be
written to the directory where the database resides in.



Juan T. Llibre
ASP.NET MVP
===========
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,104
Latest member
LesliVqm09
Top