Trouble with ADODB connection to access[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? sorry for the double post, did not know what forum to put it in.
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