🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Setting Page size on an ado command

#4085
From: Chris
Date: Wed, 10 Apr 2002 19:16
72 lines
3225 bytes
I tried that but it did not work.

ADOQuery1->Recordset does not exist (not created yet) before the dataset is
opened and setting the
PageSize after it's opened has no effect.   (still only retrieves 1000
records).

Any other options?

"Vassiliev V.V." <news@vassilievvv.mtu-net.ru> wrote in message
news:3cb46664_2@dnews...
> 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: <3cb48f92$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!news.cs.utwente.nl!logbridge.uoregon.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!feed-ev1!propagator-sterling!news-in.nuthinbutnews.com!intgwlon.nntp.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3cb45a8f_2@dnews> <3cb46664_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 12:31:12 PST
From: "Chris" <Chris.Bucher@sas.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3cb45a8f_2@dnews> <3cb46664_2@dnews>
Subject: Re: Setting Page size on an ado command
Date: Wed, 10 Apr 2002 15:16:36 -0400
Lines: 74
Organization: SAS
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: 149.173.13.60
Message-ID: <3cb48f92$1_2@dnews>
X-Trace: dnews 1018466194 149.173.13.60 (10 Apr 2002 12:16:34 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!news.cs.utwente.nl!logbridge.uoregon.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!feed-ev1!propagator-sterling!news-in.nuthinbutnews.com!intgwlon.nntp.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews