Re: Active Server Pages and ADO

From: anthony (anonymous_at_discussions.microsoft.com)
Date: 05/28/04


Date: Fri, 28 May 2004 08:01:05 -0700

Hello,
   I have tried every thing under the sun to get this to work including aduseclient. I know the db is opened in read write mode but still nothing anything else you can suggest. I thought this would be simple but im having more trouble with this than anything. Thanks in advance for your assistance.

     
     ----- Val Mazur wrote: -----
     
     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: 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)
  • Re: CursorType, LockType von ADO-Recordsets
    ... Use the CursorType property to specify the type of cursor that should be used when opening the Recordset object. ... If an unsupported value is set, then no error will result; the closest supported CursorType will be used instead. ...
    (microsoft.public.de.access.clientserver)