Results 1 to 3 of 3

Thread: Updating Access DB

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    2

    Question Updating Access DB

    Hey,

    I'm having quite a bit of trouble updating an access database from withing ASP.net using VB.net.

    I tried this simple query to update the database:
    DBConnection.Open()
    Dim dbCommand1 As New OleDbCommand("UPDATE DST_Users SET UserPW='" & newPassword & "' WHERE Username='" & in_username & "'", DBConnection)

    dbCommand1.ExecuteNonQuery() 'causes an error at this line
    DBConnection.Close()

    The error is: Operation must use an updateable query

    How do i fix the problem?

    Thanks

  2. #2
    Addicted Member
    Join Date
    Aug 2004
    Location
    Cape Town, South Africa
    Posts
    149

    Re: Updating Access DB

    You code looks fine, it sounds like a write permission error.

    Try making sure that your .mdb file is not readonly, and make sure the user has write access to the folder it is in.

    Try googling the error before you post here, as these errors are very common and there is almost always a solution somewhere on the web.

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    2

    Re: Updating Access DB

    Yep, I looked on google and it is a permission error. I need to give the 'Everyone' user write access to the file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width