PDA

View Full Version : VB ADO Cursor Problems


bitsmith2k
01-23-03, 17:17
hello, i've inheritted a bunch of bad code that i wish i had time
to rewrite and am having some problems with the cursortype of a recordset.

i have a modular level recordset that the old programmer repeatidly opens and closes the recordset rather requery.

i have found that the cursor type changes from keyset to forwardonly when he issues a .open

there is no where in the code that the recordset is programmatically changed to have a forwardonly cursor.

has anyone seen this? what can i do to force it to be a keyset?

the value of the cursortype before the .open is 1 but immediately following the open its switched to 0.

any help would be greatly appreciated.

thanks

mike

brucevde
01-24-03, 14:15
I am assuming you are using ADO.

ADO will automatically change the cursor type if the one requested is not supported by the provider or is invalid.

For instance, if a Keyset cursor is requested it will be changed to a Static cursor if the cursor location is Client side (sqloledb provider).