Article View: borland.public.cppbuilder.database.ado
Article #4079Setting Page size on an ado command
From: Chris
Date: Wed, 10 Apr 2002 15:30
Date: Wed, 10 Apr 2002 15:30
38 lines
1973 bytes
1973 bytes
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:
<3cb45a8f_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!62.24.128.13.MISMATCH!news-1.opaltelecom.net!newsfeed.icl.net!news.algonet.se!algonet!newsfeed.online.be!zur.uu.net!dca.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,9b33b6ac4ab1211f,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-04-10 08:35:25 PST From: "Chris" <Chris.Bucher@sas.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Setting Page size on an ado command Date: Wed, 10 Apr 2002 11:30:23 -0400 Lines: 40 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: <3cb45a8f_2@dnews> X-Trace: dnews 1018452623 149.173.13.60 (10 Apr 2002 08:30:23 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!62.24.128.13.MISMATCH!news-1.opaltelecom.net!newsfeed.icl.net!news.algonet.se!algonet!newsfeed.online.be!zur.uu.net!dca.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews