Solved

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

Posted on 2004-04-15
10
528 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

624 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