Results 1 to 2 of 2

Thread: Trouble with ADODB connection and recordset [resolved]

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    33

    Resolved Trouble with ADODB connection and recordset [resolved]

    I have written this code in VBScript. When I run the form, i get an error saying "current recordset does not support updating. This may br a limitation of the provider or of the selected locktype." What should I add to my connection string so that it allows recordset updating?


    Dim myvalue
    Dim conn
    Dim rec
    Dim strconn
    Dim tsk
    Sub CommandButton1_Click()

    set conn = CreateObject("ADODB.Connection")
    strconn= "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = C:\Documents and Settings\nqaam\My Documents\db1.mdb"
    conn.Open strconn
    Set rec = conn.Execute(" SELECT * FROM TEST ")



    rec.AddNew
    If Item.UserProperties("Month 2")<>"" Then
    rec.Fields("Month 2") = Item.UserProperties("Month 2")
    End If


    Set myvalue = Item.UserProperties("Month 2")
    MsgBox myvalue

    rec.Update
    rec.Close
    Conn.Close

    End Sub
    Last edited by tejiri; Jul 18th, 2005 at 12:01 PM.

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