db error: Operation must use a updateble query

Results 1 to 2 of 2

Thread: db error: Operation must use a updateble query

  1. #1
    Join Date
    Dec 1969

    Default db error: Operation must use a updateble query

    Finally back from holiday, and back on my favorite task of trying out net... ;)<BR><BR><BR>This is my code:<BR><BR>Dim strSQL As String = "INSERT INTO tblname (name, mob, email, note, memberid ) VALUES(&#039;" & Name.Text & "&#039;, &#039;" & Mob.Text & "&#039;, &#039;" & Mail.Text & "&#039;, &#039;" & Note.Text & "&#039;, &#039;" & droppgroup.SelectedItem.Value & "&#039;)"<BR>Dim strConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("kontakt.mdb") & ";"<BR><BR>Dim myConnection As New OleDbConnection(strConnString)<BR>Dim myCommand As New OleDbCommand(strSQL, myConnection)<BR>myCommand.Connection.Open()<BR>my Command.ExecuteNonQuery()<BR>myConnection.Close()< BR><BR>I guess I have to change the sql or add some flags to my connection string. <BR>But I&#039;m not sure where I should start.<BR>Haven’t found a whole lot of db inserting articles / code examples for oledb... Actually none on 4guys / aspfaq..<BR><BR>Hope all of you had a better holiday then I had!<BR>Expect cusoxty, your still quite annoying….<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Ck the permissions

    Check the permissions on the directory and file where your database is. I have found this to be the problem 95% of the time when I get this error. Make sure the IUSR has read/write permissions, and also whatever account the asp.net process is running under.<BR><BR>If you just want to check if this is the problem, add &#039;everyone&#039; and give them full-control and try to run the page. (don&#039;t forget to change this back, it&#039;s not good security.)<BR><BR>b

Posting Permissions

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