Solved

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

Posted on 2004-04-15
10
519 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 70

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 70

Expert Comment

by:Éric Moreau
ID: 10832190
CursorLocation is the strongest property.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Author Comment

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

Expert Comment

by:Éric Moreau
ID: 10832237
the predominant. If you set the CursorLocation to adUseClient, the CursorType is modified for adOpenStatic
0
 
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 70

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 70

Expert Comment

by:Éric Moreau
ID: 10832367
0
 
LVL 70

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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