Re: Active Server Pages and ADO
From: Val Mazur (group51a_at_hotmail.com)
Date: 05/28/04
- Next message: Val Mazur: "Re: ODBC(No column properties collection) vs Jet (alphabet ordering)"
- Previous message: Ryan Malone: "Download file with OLE DB Provider for Internet Publishing"
- In reply to: Anthony: "Active Server Pages and ADO"
- Next in thread: anthony: "Re: Active Server Pages and ADO"
- Reply: anthony: "Re: Active Server Pages and ADO"
- Reply: Anthony: "Re: Active Server Pages and ADO"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 May 2004 22:03:23 -0400
Hi Anthony
Try to set CursorLocation property of the recordset to adUseClient and see
if it works. If not, then let me know. Other way is to use INSERT SQL
statement directly, rather that recordset. Using of the INSERT would work
faster and will not handle any cursor.
--
Val Mazur
Microsoft MVP
"Anthony" <anonymous@discussions.microsoft.com> wrote in message
news:6BACB594-FB27-4190-97E6-401B24792209@microsoft.com...
>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: Val Mazur: "Re: ODBC(No column properties collection) vs Jet (alphabet ordering)"
- Previous message: Ryan Malone: "Download file with OLE DB Provider for Internet Publishing"
- In reply to: Anthony: "Active Server Pages and ADO"
- Next in thread: anthony: "Re: Active Server Pages and ADO"
- Reply: anthony: "Re: Active Server Pages and ADO"
- Reply: Anthony: "Re: Active Server Pages and ADO"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|