Re: Download Speed

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Stephen Howe (stephenPOINThoweATtns-globalPOINTcom)
Date: 03/15/04


Date: Mon, 15 Mar 2004 22:09:22 -0000


> Thank you for your response. I verified that by setting the cursor
location to server and I call my select statement directly
(pRec->Open("SELECT * FROM XXXXX", conn, adOpenForwardOnly, adLockReadOnly,
adCmdUnknown))..

Don't give ADO adCmdUnknown. It takes longer. That should be adCmdText

.. it does indeed limit the amount downloaded. However, if I call a stored
procedure instead of a straight SELECT statement it returns all of the data
at once.

A few words.

The Connection "CursorLocation" is the default cursorlocation of a
RecordSet.
If you don't bother setting a "CursorLocation" for a RecordSet, then the
default location is whatever the Connection's is. The Recordset's
"CursorLocation" is so that you can override what is the Connection default

You don't say _HOW_ you are calling your Stored Procedure. I assume that
you have setup a Comamnd object and you are doing

rs = Command.Execute(...)

But in this case, what is the Connection CursorLocation? If it is
server-sided, I would you to get a limited number of records, same as
opening a Recordset. The fact that you are not puzzles me.

I would suggest debug printing out what the Recordset's CursorLocation,
LockType and CursorType after returning from SP.

SH



Relevant Pages

  • Re: ADODB.Connection als VBControlExtender deklarieren
    ... Du beim Erstellen Deiner Connection keine CursorLocation ... Ein anschliessend erstelltes Recordset, dem Du diese ... lokal im Speicher und deshalb kann auch jederzeit ...
    (microsoft.public.de.vb)
  • Re: CursorLocation -> Scrollbar behavior
    ... or does is work with the SQL Server? ... For RecordNo OLEDB allows to return approximate value. ... Both values are used by DBGrid. ... where its located in the table, when the Cursorlocation is set to Server. ...
    (borland.public.delphi.database.ado)
  • Re: ADO Recordset vs Command and AD
    ... The CursorLocation can be set on the connection prior to opening the ... This CursorLocation is applied to the recordset opened on this ... If the connection's CursorLocation is set to adUseClient, ...
    (microsoft.public.scripting.vbscript)
  • Re: ADO Recordset vs Command and AD
    ... The CursorLocation can be set on the connection prior to opening the ... This CursorLocation is applied to the recordset opened on this ... If the connection's CursorLocation is set to adUseClient, ...
    (microsoft.public.scripting.vbscript)
  • Re: Download Speed
    ... out, under SQL Server, is server-sided,readonly,forwardonly. ... then you have no control on the RecordSet, you should get the ... get back Forward only, Readonly, Server Sided RecordSet, CacheSize = 1. ... Connection CursorLocation is Client-sided, you should get back Static, ...
    (microsoft.public.data.ado)