Solved

Recordsets: Cursor Location: Client Vs Server: I am confused

Posted on 2004-04-15
10
510 Views
Last Modified: 2008-02-01
I know that when the a recordset is opened this way, the entire data will be "transferred" to the client and I can close the connection. Am I right?

Set adoRs.ActiveConnection = adoConn
adoRs.CursorLocation=adUseClient
adoRs.CursorType=adOpenStatic
adoRs.Open "SELECT * FROM TB_USERS"
Set adoRs.ActiveConnection = Nothing

What I am confused about is, what happens in the case below? Is the data transferred to the client? If YES then how is the data kept in sync (its a dynamic cursor). If the data is NOT transferred, then what is the use of specifying CursorLocation as dUseClient? I have not tried this code. I just want to know whether I am thinkng it right.

Set adoRs.ActiveConnection = adoConn
adoRs.CursorLocation=adUseClient
adoRs.CursorType=adOpenDynamic  'CHANGE FROM adOpenStatic TO adOpenDynamic
adoRs.Open "SELECT * FROM TB_USERS"
Set adoRs.ActiveConnection = Nothing

Also what happend if I use a adOpenKeyset instead?

I just want to get a clear picture of what happens with these and all other possible combinations? Especially the use of adUseClient and when the data is really on the client.

Thanks
Vickram
0
Comment
Question by:VICKRAM
  • 6
  • 4
10 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 10832094
most options (like keyset and dynamic) are only usable when you use a server sided live cursor.
0
 
LVL 13

Author Comment

by:VICKRAM
ID: 10832134
do you mean VB ignores the CursorLocation property when CursorType is keyset or dynamic ?
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 10832190
CursorLocation is the strongest property.
0
 
LVL 13

Author Comment

by:VICKRAM
ID: 10832217
i did not understand wht u meant by  strongest property
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 10832237
the predominant. If you set the CursorLocation to adUseClient, the CursorType is modified for adOpenStatic
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 13

Author Comment

by:VICKRAM
ID: 10832295
you mean If I set the CursorType to Dynamic/Keyset/ForwardOnly it will change to Static, if the cursorlocation is set to Client?
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 10832318
Yes. Also not all providers (for exemple Jet) are supporting all ADO options.
0
 
LVL 13

Author Comment

by:VICKRAM
ID: 10832342
Does that mean that the only way to get all the data actually to the client machine is to use Client cursor location and cursortype as static?
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 10832367
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 100 total points
ID: 10832381
As soon as you open a Client-sided cursor, all the data is downloaded to the client.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now