🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4081

Re: Setting Page size on an ado command

#4081
From: Vassiliev V.V.
Date: Wed, 10 Apr 2002 16:18
55 lines
2645 bytes
PageSize is not property of ADO Command. It is a property (but not member of
Properties collection) of ADO Recordset. So, you need something like:
ADOQuery1->Recordset->PageSize = 64;
or
rc->Recordset->PageSize = 64;
depending on which type is rc (I suppose it is something that inherits from
TCustomADODataSet). You may also check that rc->Recordset is not NULL.

Regards,
Vassiliev V.V.
http://www.oledbdirect.com

"Chris" <Chris.Bucher@sas.com> �������/�������� � �������� ���������:
news:3cb45a8f_2@dnews...
> I have Borland C++ Builder 6 and I am am trying to run a query against the
> active directory.
> The problem is that only 1000 records are returned.  The solution is to
set
> the Page Size property of the Command object
> to a larger number, say 64.  This works in VB.
>
> When I try it in C++ Builder, first it gave me a linker error that
> CheckAutoResult was not found.
> I worked around that problem by adding:
>
> namespace System {
>     void __fastcall CheckSafecallResult(HRESULT hr)
>     {
>         OleCheck(hr);
>     }
> }
>
> Now when I set the property the error code says that property is not
> available.
>
> Here is the code:
>
>         comm->Properties->Item["Page Size"]->Value = 64;   // This line
> gives an error saying that Page Size is not in the collection.
>         rc->Recordset = comm->Execute();
>
>         while(!rc->Eof){
>                 ... do something
>             rc->Next();
>        }
>
> If I take out the Page size setting, the code does work but only retreives
> 1000 rows (an Active Directory thing).
>
> Can someone help me?
>
> Thanks
> Chris
>
>
Technical Details
Message-ID: <3cb46664_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!news.infoave.net!newsfeed.frii.net!newsfeed.icl.net!isdnet!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnews
References: <3cb45a8f_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,9b33b6ac4ab1211f
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-04-10 09:31:36 PST
From: "Vassiliev V.V." <news@vassilievvv.mtu-net.ru>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3cb45a8f_2@dnews>
Subject: Re: Setting Page size on an ado command
Date: Wed, 10 Apr 2002 20:18:08 +0400
Lines: 57
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 62.118.139.111
Message-ID: <3cb46664_2@dnews>
X-Trace: dnews 1018455652 62.118.139.111 (10 Apr 2002 09:20:52 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!news.infoave.net!newsfeed.frii.net!newsfeed.icl.net!isdnet!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnews