Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 553
  • Last Modified:

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

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
VICKRAM
Asked:
VICKRAM
  • 6
  • 4
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
most options (like keyset and dynamic) are only usable when you use a server sided live cursor.
0
 
VICKRAMAuthor Commented:
do you mean VB ignores the CursorLocation property when CursorType is keyset or dynamic ?
0
 
Éric MoreauSenior .Net ConsultantCommented:
CursorLocation is the strongest property.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
VICKRAMAuthor Commented:
i did not understand wht u meant by  strongest property
0
 
Éric MoreauSenior .Net ConsultantCommented:
the predominant. If you set the CursorLocation to adUseClient, the CursorType is modified for adOpenStatic
0
 
VICKRAMAuthor Commented:
you mean If I set the CursorType to Dynamic/Keyset/ForwardOnly it will change to Static, if the cursorlocation is set to Client?
0
 
Éric MoreauSenior .Net ConsultantCommented:
Yes. Also not all providers (for exemple Jet) are supporting all ADO options.
0
 
VICKRAMAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
As soon as you open a Client-sided cursor, all the data is downloaded to the client.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now