ADO CursorLocation Eiendom
❮ Voltooi rekordstel-objekverwysing
Die CursorLocation-eienskap stel of gee 'n lang waarde terug wat die ligging van die wyserdiens aandui. Dit kan op een van die CursorLocationEnum- waardes gestel word. Verstekwaarde is AdUseServer.
'n Wyser word gebruik om:
- beheer rekordnavigasie
- beheer die sigbaarheid van veranderinge in die databasis
- beheer die opdateerbaarheid van data
Let wel: 'n Rekordstel-objek erf hierdie instelling van die geassosieerde verbinding-objek.
Let wel: Hierdie eienskap is leesalleen op 'n oop Rekordstel-objek, en lees/skryf op 'n Connection-objek of op 'n geslote Recordset-objek.
Sintaksis
objConnection.CursorLocation
objRecordset.CursorLocation
Voorbeeld
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("northwind.mdb"))
set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM Customers"
rs.CursorLocation=adUseClient
rs.CursorType=adOpenStatic
rs.LockType=adLockBatchOptimistic
rs.Open sql,conn
rs.Close
conn.Close
%>
CursorLocationEnum Waardes
Constant | Value | Description |
---|---|---|
adUseNone | 1 | OBSOLETE (appears only for backward compatibility). Does not use cursor services |
adUseServer | 2 | Default. Uses a server-side cursor |
adUseClient | 3 | Uses a client-side cursor supplied by a local cursor library. For backward compatibility, the synonym adUseClientBatch is also supported |
❮ Voltooi rekordstel-objekverwysing