Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CursorLocation Properity

0 views
Skip to first unread message

Tal Greenwurzel

unread,
Feb 25, 2002, 8:40:53 AM2/25/02
to
Hi,

Can someone please tell me what does the prosperity CursorLocation of ADO
Connection does?

When I set it to adUseClient and open a recordset with adOpenDynamic, the
prosperity RecordCount does not work and it's impossible to make this
recordset the datasourse of DataGrid.

Is that how it should be?

Does adOpenDynamic forces me to set the CursorLocation to adUseClient ?

Thanks,
Tal.

Jacek Zarzycki

unread,
Feb 25, 2002, 8:56:37 AM2/25/02
to
FROM MSDN

Constant Description
adUseNone No cursor services are used. (This constant is obsolete and
appears solely for the sake of backward compatibility.)
adUseClient Uses client-side cursors supplied by a local cursor library.
Local cursor engines often will allow many features that driver-supplied
cursors may not, so using this setting may provide an advantage with
respect to features that will be enabled. For backward compatibility,
the synonym adUseClientBatch is also supported.
adUseServer Default. Uses data-provider– or driver-supplied cursors.
These cursors are sometimes very flexible and allow for additional
sensitivity to changes others make to the data source. However, some
features of the Microsoft Client Cursor Provider (such as disassociated
recordsets) cannot be simulated with server-side cursors and these
features will be unavailable with this setting.


Remarks

This property allows you to choose between various cursor libraries
accessible to the provider. Usually, you can choose between using a
client-side cursor library or one that is located on the server.

This property setting affects connections established only after the
property has been set. Changing the CursorLocation property has no
effect on existing connections.

This property is read/write on a Connection or a closed Recordset, and
read-only on an open Recordset.

Connection.Execute cursors will inherit this setting. Recordsets will
automatically inherit this setting from their associated connections.

Remote Data Service Usage When used on a client-side (ADOR) Recordset
or Connection object, the CursorLocation property can only be set to
adUseClient.

Jacek


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Sylvie

unread,
Feb 25, 2002, 8:57:48 AM2/25/02
to
AFAIK Recordcount only works with Client Side Cursors.

I use AdoAnywhere http://www.adoanywhere.com/cnet to show the combinations
of Recordset settings that are valid for my provider. The values you request
are often MODIFIED by the provider without you knowing.

You may be getting forwardOnly connection.

Jackson

unread,
Feb 25, 2002, 9:36:23 AM2/25/02
to
Recordcount only works with cursors that support bookmarks. The Static
(Client Side) Cursor is one of these.

The Only ClientSide Cursor is a Static Cursor

Cheers

Gregory A Jackson MCSD, MCT

Kalicanin Goran

unread,
Feb 25, 2002, 10:54:50 AM2/25/02
to
There is also one other but not so elegant way for getting RecordCount. The
good news is that it works with all types of cursors .
After you open recordset you should use MoveLast method which force ADO to
read all the records from the server to the client side and then the value
of RecordCount is correct. Of course you should use MoveFirst call if you
want to scroll over the recordset again(in case of forward only cursors this
could be a problem :) ). If you intend to read all the records from the
server than this approach is not a waste of time.

Goran

"Tal Greenwurzel" <talg...@infomall.co.il> wrote in message
news:OKPsmIgvBHA.2280@tkmsftngp05...

Tal Greenwurzel

unread,
Feb 25, 2002, 12:19:52 PM2/25/02
to

When do I need to use Client location, and when Server location?


"Kalicanin Goran" <gor...@spin.si> wrote in message
news:O4AwvShvBHA.2216@tkmsftngp02...

CF

unread,
Feb 25, 2002, 6:56:51 PM2/25/02
to
Tal,
Generally:
If you are going to disconnect from the provider, use a client side
cursor.
If you are writing COM+ applications, you "should" use client side
cursors.
If you have a slow network and can preload your data through a client
side cursor, which will take some time, but your subsequent data access
activities will be faster with a client side cursor.

HTH
CF
--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Tal Greenwurzel" <talg...@infomall.co.il> wrote in message

news:u2Gr2BivBHA.1648@tkmsftngp04...

CF

unread,
Feb 25, 2002, 6:41:01 PM2/25/02
to
Sylvie,
Not sure that your comment regarding recordcount is absolutely correct. I
believe that RecordCount will be accurate for most providers after a
movelast. There may be some provider that this is not true for.

And, yes, providers do change settings to accommodate for incompatible
settings requests.
HTH
CF

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Sylvie" <sxe...@hotmail.com> wrote in message
news:ubBPzQgvBHA.2612@tkmsftngp03...

0 new messages