๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TADOQuery and eoASyncFetch problem

#2018
From: Vic
Date: Thu, 11 Dec 2003 15:48
60 lines
3220 bytes
Thanks Vassiliev, that works perfert!!. The problem that I have now is when
I try to write it in C++.
Which is the way to do this in Builder ? :
DataSet.Recordset.Fields['OrderID'].Value

All the other things works perfect in Builder too. Thanks

"Viatcheslav V. Vassiliev" <support@oledbdirect.com> escribi๏ฟฝ en el mensaje
news:3fd874b0@newsgroups.borland.com...
> It is interesting. This will not solve your problem, but it is not with
> CacheSize - it is with ADO Express. However exactly CacheSize first rows
are
> missed:
>
> procedure TForm1.ADOQuery1FetchComplete(DataSet: TCustomADODataSet;
>   const Error: Error; var EventStatus: TEventStatus);
> var
>   ListItem: TListItem;
>   i: Integer;
> begin
>   i := 0;
>
>   DataSet.First;
>   DataSet.Recordset.MoveFirst();
>   with ListView1 do
>   begin
>  while ( DataSet.Eof = false ) do
>  begin
>    ListItem := Items.Add;
>    ListItem.Caption := //DataSet.FieldValues['OrderID'];
>   DataSet.Recordset.Fields['OrderID'].Value;
>    ListITem.SubItems.Add(//DataSet.FieldValues['ProductID']);
>   DataSet.Recordset.Fields['ProductID'].Value);
>    Inc(i);
>    DataSet.Next;
>  end;
>   end;
>   Label1.Caption := 'Dataset '+ IntToStr(Dataset.RecordCount) + ' Items '
+
>  IntToStr(ListView1.Items.Count) + ' Items2 ' + IntToStr(i);
> end;
>
> I added variable i to be sure that the problem is not in TListView (in
other
> tests I commented all TListView-related code). I found that if I use ADO
> recordset methods (avoiding TDataSet methods) all works correctly.
> DataSet.Recordset.MoveFirst() added to position to first record and
> DataSet.FieldValues['FieldName'] should be changed to
> DataSet.Recordset.Fields['FieldName'].Value. Now correct number is
> displayed. Tested with [Order Details] table from Northwind database, MS
SQL
> Server.
>
> //------------------------------------------
> Regards,
> Vassiliev V. V.
> http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
> http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> MS Jet (Access) and Interbase (through OLEDB)
>
Technical Details
Message-ID: <3fd891a0$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fd76a28@newsgroups.borland.com> <3fd80f4e@newsgroups.borland.com> <3fd82a7b@newsgroups.borland.com> <3fd85c21$1@newsgroups.borland.com> <3fd86d01@newsgroups.borland.com> <3fd874b0@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,361a11b4c91b34f
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-12-11 08:09:53 PST
Reply-To: "Vic" <Victor@espainformatica.com>
From: "Vic" <victor@espainformatica.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3fd76a28@newsgroups.borland.com> <3fd80f4e@newsgroups.borland.com> <3fd82a7b@newsgroups.borland.com> <3fd85c21$1@newsgroups.borland.com> <3fd86d01@newsgroups.borland.com> <3fd874b0@newsgroups.borland.com>
Subject: Re: TADOQuery and eoASyncFetch problem
Date: Thu, 11 Dec 2003 16:48:01 +0100
Lines: 62
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: 80.24.136.172
Message-ID: <3fd891a0$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1071157664 80.24.136.172 (11 Dec 2003 07:47:44 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail