Read-Only error when writing to Access database

S

Stephen D Cook

Dim objConn
objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=DCTRepair"
objConn.Open()
Dim objRS
objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open("TechEntry", objConn, 2, 3, 2)
objRS.AddNew()
objRS("SerialNumber") = TextBox1.Text
objRS("TechNumber") = TextBox2.Text
'objRS.MoveLast()

objRS.Update()
objRS.MoveFirst()

objConn.Close()
objConn = Nothing
End Sub

The code above works fine till I try to update or use the MoveLast
option for the database. Any ideas?
 
G

Guest

Dim objConn
objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=DCTRepair"
objConn.Open()
Dim objRS
objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open("TechEntry", objConn, 2, 3, 2)
objRS.AddNew()
objRS("SerialNumber") = TextBox1.Text
objRS("TechNumber") = TextBox2.Text
'objRS.MoveLast()

objRS.Update()
objRS.MoveFirst()

objConn.Close()
objConn = Nothing
End Sub

The code above works fine till I try to update or use the MoveLast
option for the database. Any ideas?

Stephen, sounds like you don't have modify permissions at the
directory where the database is located, or a database file is read-
only.
 
M

Mark Rae [MVP]

Any ideas?

You're in the wrong newsgroup - this group is for ASP.NET.

For ASP Classic issues please post to
microsoft.public.inetserver.asp.general
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top