Re: Active Server Pages and ADO

From: Val Mazur (group51a_at_hotmail.com)
Date: 05/28/04


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
> 


Relevant Pages

  • Re: using adOpenDynamic
    ... Are you sure a default forward-only cursor won't do the job for ... Set objRS = CreateObject ... Loop ... response.write "Recordset was empty" ...
    (microsoft.public.inetserver.asp.db)
  • Re: Gebundene Controls aus ADO-Recordset aktualisieren
    ... Engpass ist vor allem das LAN und der Server selbst. ... ob man mit einem SQL-Server oder der Jet-Engine ... Cursor und statischen Recordsets, egal welches Datenbanksystem ... dass eine Bewegung im Recordset eben auch ...
    (microsoft.public.de.vb.datenbank)
  • Re: Gebundene Controls aus ADO-Recordset aktualisieren
    ... Wozu ein serverseitiger Cursor? ... Ich kann also z.B. bei adOpenKeyset im Programmcode ... CursorLocation adUseServer bei Access sinnlos, ... wenn Du in Deinem Recordset zu einem anderen ...
    (microsoft.public.de.vb.datenbank)
  • Re: Suche mit SEEK
    ... ein Recordset mit serverseitigem Cursor ... Das heisst also es muss ein Recordset mit serverseitigem Cursor ... clientseitigem Cursor arbeiten und die Suche nach einem bestimmten Datensatz ...
    (microsoft.public.de.vb.datenbank)
  • Re: How to summarize recordset...Select Distinct alternative?
    ... functionality to store a set of paired values ... then the recordset is copied into local ... ADO provides a Cursor Library that provides the cursor ... reconnected to the database simply by setting the ActiveConnection to an ...
    (microsoft.public.data.ado)