Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO CursorType
Message
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Miscellaneous
Thread ID:
00527242
Message ID:
00528409
Views:
14
If you are only displaying data, use a foreward-only cursor (server or client). You can get this from the connection.execute method

set ocn=server.createobject("adodb.connection")
ocn.connectionstring=...
ocn.cursorlocation=adUseClient
set ors = ocn.execute("sql statement")


If you need a recordset that you can update or sort, use a static, client recordset with optimistic locking. You will need to use the open method of the recordset object.

SET ocn=server.createobject("ADODB.CONNECTION")
ocn.open("connection string")
SET ors=server.createobject("ADODB.RECORDSET")
ors.cursorlocation=adUseClient
Getrs.CursorType = adOpenStatic
Getrs.LockType = adLockOptimistic
ors.OPEN "SELECT * FROM mytable",ocn

This is the most flexible type of recordset.
Previous
Reply
Map
View

Click here to load this message in the networking platform