🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TADOQuery and eoASyncFetch problem

#2019
From: Viatcheslav V. Vassiliev
Date: Thu, 11 Dec 2003 19:36
76 lines
3870 bytes
DataSet->Recordset->Fields->Item[WideString("OrderID")]->Value;

//------------------------------------------
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)

"Vic" <victor@espainformatica.com> �������/�������� � �������� ���������:
news:3fd891a0$1@newsgroups.borland.com...
> 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: <3fd8c747$2@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> <3fd891a0$1@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 11:39:52 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.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> <3fd891a0$1@newsgroups.borland.com>
Subject: Re: TADOQuery and eoASyncFetch problem
Date: Thu, 11 Dec 2003 22:36:32 +0300
Lines: 79
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 213.234.218.42
Message-ID: <3fd8c747$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1071171399 213.234.218.42 (11 Dec 2003 11:36:39 -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