Read-Only error when writing to Access database

Discussion in 'ASP .Net' started by Stephen D Cook, Dec 13, 2007.

  1. 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 D Cook, Dec 13, 2007
    #1
    1. Advertising

  2. 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.
    Alexey Smirnov, Dec 13, 2007
    #2
    1. Advertising

  3. "Stephen D Cook" <> wrote in message
    news:...

    > 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
    Mark Rae [MVP], Dec 13, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. keithb
    Replies:
    2
    Views:
    7,990
    keithb
    Jun 7, 2006
  2. Fabrizio Pollastri

    Writing a read only attribute

    Fabrizio Pollastri, Jul 6, 2007, in forum: Python
    Replies:
    1
    Views:
    309
    Michele Simionato
    Jul 6, 2007
  3. Fabrizio Pollastri

    Writing a read only attribute

    Fabrizio Pollastri, Jul 6, 2007, in forum: Python
    Replies:
    2
    Views:
    252
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Jul 6, 2007
  4. Graham Taylor

    Read-Only Problem with Access Database

    Graham Taylor, May 10, 2005, in forum: ASP General
    Replies:
    7
    Views:
    172
    Graham Taylor
    May 13, 2005
  5. Stephen D Cook

    Read Only error when trying to write to Access DB

    Stephen D Cook, Dec 14, 2007, in forum: ASP General
    Replies:
    2
    Views:
    101
    Bob Barrows [MVP]
    Dec 14, 2007
Loading...

Share This Page