Re: Active Server Pages and ADO
From: anthony (anonymous_at_discussions.microsoft.com)
Date: 05/28/04
- Next message: rc: "Canceling Ado Connection"
- Previous message: Murat AKSAKAL: "Transaction with SET XACT_ABORT ON"
- In reply to: Val Mazur: "Re: Active Server Pages and ADO"
- Next in thread: Anthony: "Re: Active Server Pages and ADO"
- Messages sorted by: [ date ] [ thread ]
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
>
- Next message: rc: "Canceling Ado Connection"
- Previous message: Murat AKSAKAL: "Transaction with SET XACT_ABORT ON"
- In reply to: Val Mazur: "Re: Active Server Pages and ADO"
- Next in thread: Anthony: "Re: Active Server Pages and ADO"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|