Please explain the use of rec.CursorLocation = adUseClient

Posted on 2014-08-04
Last Modified: 2014-08-04
Many times I would open a recordset to place in a datagrid in vb6 with

rec.Open (esql), conn, adOpenDynamic, adLockOptimistic

Open in new window

However, in one instance I needed to use the following:

rec.CursorLocation = adUseClient
                rec.Open (esql), conn, adOpenDynamic, adLockOptimistic

Open in new window

Can someone explain to me what the purpose is of the first line in this code.
Question by:al4629740
    LVL 25

    Assisted Solution

    by:Luis Pérez
    LVL 4

    Accepted Solution

    One practical example of using a client side cursor is obtaining a record count.


    Open in new window

    Combined with a SELECT query, a server side cursor this would return -1 for this property. With a client side cursor you would obtain the number of records returned by the query.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    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…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    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…

    779 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

    15 Experts available now in Live!

    Get 1:1 Help Now