always getting static or forward only cursors

always getting static or forward only cursors

Post by Michael Tzoano » Mon, 21 Feb 2000 04:00:00



How are you opening you recordsets?

Are you using commands or connections to get a recordset?

If so, you are getting the firehose recordset which is forward-only,
read-only (and I think it's server-side).  You can't change it to  a dynamic
or keyset even by setting the recordset's properties.

If not, then you should be able to open any type of recordset.  Are you
setting the cursortype property to adDynamic or adKeyset
(adodb.CursorTypeEnum) when opening the recordset?

Oh, I forgot, the connectmode of the connection can override the recordset's
properties.  Take a look and make sure it allows you to get updatable
recordsets.

Hope that helps,

Michael Tzoanos


Quote:> Hi all,

> i am using ADO (2.5, 2.1) with access 97, optionally SQL server
> connecting through their oledb providers.
> how can i get dynamic or keyset cursors?

> Lars

 
 
 

always getting static or forward only cursors

Post by Lars Neidec » Wed, 23 Feb 2000 04:00:00


Hi all,

i am using ADO (2.5, 2.1) with access 97, optionally SQL server
connecting through their oledb providers.
how can i get dynamic or keyset cursors?

Lars

 
 
 

always getting static or forward only cursors

Post by Lars Neidec » Wed, 23 Feb 2000 04:00:00


Hi all,

i am using ADO (2.5, 2.1) with access 97, optionally SQL server
connecting through their oledb providers.
how can i get dynamic or keyset cursors?

Lars

 
 
 

always getting static or forward only cursors

Post by Egbert Niero » Fri, 25 Feb 2000 04:00:00


Set Rs = Server.CreateObject("ADODB.RecordSet")

Rs.Open "SELECT somfields FROM yourtable", YourConnObj, adOpenStatic,
adLockOptimistic, adCmdText


Quote:> Hi all,

> i am using ADO (2.5, 2.1) with access 97, optionally SQL server
> connecting through their oledb providers.
> how can i get dynamic or keyset cursors?

> Lars

 
 
 

always getting static or forward only cursors

Post by Greg Jackso » Fri, 25 Feb 2000 04:00:00


Lock Optimistic is blowing away your static recordset......

Change it to LockBatchOptimistic

--
Cheers,

Gregory A Jackson MCSD, MCT
Sr Software Engineer
STEP Technology
PDX, OR


> Set Rs = Server.CreateObject("ADODB.RecordSet")

> Rs.Open "SELECT somfields FROM yourtable", YourConnObj, adOpenStatic,
> adLockOptimistic, adCmdText



> > Hi all,

> > i am using ADO (2.5, 2.1) with access 97, optionally SQL server
> > connecting through their oledb providers.
> > how can i get dynamic or keyset cursors?

> > Lars

 
 
 

1. Forward only cursor when I've asked for static

My code:  
Dim objCMD                      'command object
With objCMD
        .ActiveConnection = session("svConnection")
        .CommandType=adCmdStoredProc
        .Parameters.Append .CreateParameter

End with
...
Set objRS3 = Server.CreateObject("ADODB.Recordset")
        objRS3.Open
objCMD,,adOpenStatic,adLockReadOnly,adCmdStoredProc

        vnumofrecords = objRS3.RecordCount

The recordset is opening correctly with the appropriate
records ( the stored procedure is working).  However, I'm
getting a forward-only cursor instead of the adOpenStatic
cursor that I'm asking for.  Anyone seen this before?  
It's impacting my application in that I need to know how
many records it has returned before it displays those
records (50 or 12,050).

TIA-
L

2. Capture Error in DTS Package, From Inside DTS Package

3. Keep getting the exception: Error setting up static cursor cache

4. JDBC driver for openview

5. Using a static cursor but still getting -1 for RecordCount

6. Comparing RDBMS engines / LOCKING

7. Fast-forward cursors not so fast?

8. SS2000 Standard Licensing

9. ODBC fast-forward cursors broken by SP3?

10. FAST FORWARD Cursor

11. Server Side Cursor Keeps opening as forward only!

12. Fast-forward cursors not so fast?

13. Forward Only Cursor ??