🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database.dotnet
Article #1

copying a record

#1
From: Brigitte Spatz
Date: Mon, 06 Nov 2006 15:09
20 lines
1585 bytes
What is the correct way to copy a record? I've tried

var
   dr: DataRow;
   i: Integer;
begin
   dr := dv.Item[bm.Position].Row; {dv = Dataview, bm = BindingManagerBase}
   for i := 0 to Length(arrComp) - 1 do //arrComp = array of Integer
   begin
     bm.AddNew;
     dv.Item[bm.Position].Row.ItemArray := dr.ItemArray;
     dv.Item[bm.Position].Row.Item['fld_company'] := arrComp[i];
     bm.EndCurrentEdit; //this doesn't work, gives "no value at index 8"
     db.write_changes_ins(da, ds, true, 'ODM', sqlInsertCommand1);
   end;
   dv.AllowNew := False;

TIA.

Brigitte
Technical Details
Message-ID: <454f502b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!ucberkeley!news-hog.berkeley.edu!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1effe6,1ccf0ad458ca5df4,start
X-Google-Attributes: gid1effe6,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 06 Nov 2006 16:09:25 +0100
From: Brigitte Spatz <brigitteNOSPAM.spatz@svenmahn.de>
Organization: Sven Mahn IT-Systementwicklungen
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
MIME-Version: 1.0
Newsgroups: borland.public.delphi.database.dotnet
Subject: copying a record
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 0645-4, 03/11/2006), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 217.189.170.219
Message-ID: <454f502b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1162825771 217.189.170.219 (6 Nov 2006 07:09:31 -0700)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!ucberkeley!news-hog.berkeley.edu!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail