Solved

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

Posted on 2004-04-15
10
507 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

14 Experts available now in Live!

Get 1:1 Help Now