Active Server Pages and ADO
From: Anthony (anonymous_at_discussions.microsoft.com)
Date: 05/27/04
- Next message: Mike: "RE: VC++ connect string for Excel 2002?"
- Previous message: Mike UK: "SHAPE with ADO and Recordsets - unable to see data in 2nd child"
- Next in thread: Val Mazur: "Re: Active Server Pages and ADO"
- Reply: Val Mazur: "Re: Active Server Pages and ADO"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 May 2004 07:41:04 -0700
i have opened connection to an access db and opened a recordset. I want to insert records in the record set but continue to get an error message stating that the cannot update database or recordset is read only. The user i have logged on as is the owner and has all privs, i have tried all the cursor type parameters and still nothing. Can anyone tell me what is wrong. Here is my code lines:
Dim objDC, objRS, sqlInsert
' Create and establish data connection
Set objDC = Server.CreateObject("ADODB.Connection")
objDC.ConnectionTimeout = 15
objDC.CommandTimeout = 30
sqlInsert = "Insert into tblusers values " & _
"('mhren','mhren')"
'Use this line to use Access
objDC.Open "DBQ=" & Server.MapPath("dbTrack.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20;","mhren", "mhren"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "tblusers", objDC, 3, 2
objRS.Addnew
objRS.Fields("uid") = "mhren"
objRS.update
- Next message: Mike: "RE: VC++ connect string for Excel 2002?"
- Previous message: Mike UK: "SHAPE with ADO and Recordsets - unable to see data in 2nd child"
- Next in thread: Val Mazur: "Re: Active Server Pages and ADO"
- Reply: Val Mazur: "Re: Active Server Pages and ADO"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|