|
-
Jul 18th, 2005, 11:06 AM
#1
Thread Starter
Member
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
Last edited by tejiri; Jul 18th, 2005 at 12:00 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|