MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Read-Only error when writing to Access database

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ASPNet
Author Message
Stephen D Cook



Joined: 09 Nov 2007
Posts: 1

PostPosted: Thu Dec 13, 2007 4:10 am    Post subject: Read-Only error when writing to Access database Reply with quote

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?

Archived from group: microsoft>public>dotnet>framework>aspnet
Back to top
View user's profile Send private message
Alexey Smirnov



Joined: 08 Aug 2007
Posts: 11

PostPosted: Thu Dec 13, 2007 4:45 am    Post subject: Re: Read-Only error when writing to Access database Reply with quote

On Dec 13, 8:10 am, Stephen D Cook 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.
Back to top
View user's profile Send private message
Mark Rae [MVP]



Joined: 08 Aug 2007
Posts: 29

PostPosted: Thu Dec 13, 2007 1:45 pm    Post subject: Re: Read-Only error when writing to Access database Reply with quote

"Stephen D Cook" wrote in message @4ax.com...

> 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

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Server Error (Resources) My ASP.NET app works with resources for loading text to the different controls (multilingual app) and everything works fine. but from time to time I have the following error. Then I have to wait for some time and my app continues working (I don't have to

Database Access error i when deployingVB6 system convereted I have converted a substantial VB6 application (conversion took 3 months) to VB2005 and it works beautifully EXCEPT on SOME PCs to which it is deployed I deploy by XCOPY ( I cannot use one click) from an XP system to other XP systems On a PC on which dotn

Error 1304.Error writing to file: Microsoft.Vsa.dll. Verify hello i tried to install this and i got this error.. Error 1304.Error writing to file: i am logged in as admin but to no avil i cant install this can anybody give me a hand hopefully somebody knows what is going on ... Heather

Read DHCP database from script Hi, I have a Windows 2003 dhcp server with 60 scopes. I would like to know how to retreive (with WMI script or else) dhcp clients informations (like host name, mac adress, ip adress) from dhcp server database. Thank you for any help Patrice

How Read Database whit datos in Format RTF How shows information in format RTF with ASPNET from a DataBase??? Thanks. Is urgent
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ASPNet All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group