Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Read-Only error when writing to Access database

Reply
Thread Tools

Read-Only error when writing to Access database

 
 
Stephen D Cook
Guest
Posts: n/a
 
      12-13-2007
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?

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      12-13-2007
On Dec 13, 8:10 am, Stephen D Cook <(E-Mail Removed)> wrote:
> 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.
 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      12-13-2007
"Stephen D Cook" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> 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


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
asp.net error writing to database =?Utf-8?B?SGFycmlzb24gU2Nob2ZpbGw=?= ASP .Net 1 05-04-2007 12:00 PM
writing to an access database? bazzer ASP .Net 2 04-10-2006 05:41 PM
Writing query statement to Access Database from ASP page George Stout ASP General 4 01-21-2004 11:14 PM



Advertisments