🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to copy only one row from a dataset to another dataset?

#4004
From: Junlin Xie
Date: Sat, 13 Apr 2002 17:13
42 lines
2015 bytes
Hi,
     Thanks for you reply!

    My second DataSet is empty, there have no field definition,  using
Clone function, beside you can copy the whole DataSet, you also copied the
data structure, In my case,  It's similar with Clone function,  but I just
want to copy a single row only. How should I do?

    Thank you!


"Sorokoletov Gregory" <gsorokoletov@sovintel.net> wrote in message
news:3cb686cd_1@dnews...
> I do not know a single command, but you can use the following algorithm:
>
> DstDataSet->Insert();
> try
> {
>   for(int I= 0; I < SrcDataSet->Fields->Count; I++)
>     DstDataSet->Fields->ields[I]->Value=
SrcDataSet->Fields->ields[I]->Value
> }
> catch(...)
> {
>   // ERROR
> }
> DstDataSet->Post();
>
> "Junlin Xie" <jlxie@yahoo.com> wrote in message news:3cb68046_2@dnews...
> > Hi,
> >
> >     I have two ADODataSet in a form, I know I can use ADODataSet->Clone
to
> > copy a dataset to another one, but now I just want to copy one current
row
> > to another ADODataSet, How can I do this? Thanks!
> >
> > Junlin Xie
> >
> >
>
>
Technical Details
Message-ID: <3cb86383_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnews
References: <3cb68046_2@dnews> <3cb686cd_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,cc9c402db8fdbf1
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-04-13 10:01:26 PST
From: "Junlin Xie" <jlxie@yahoo.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3cb68046_2@dnews> <3cb686cd_1@dnews>
Subject: Re: How to copy only one row from a dataset to another dataset?
Date: Sun, 14 Apr 2002 01:13:58 +0800
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 202.104.113.54
Message-ID: <3cb86383_2@dnews>
X-Trace: dnews 1018717059 202.104.113.54 (13 Apr 2002 09:57:39 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnews