Board index » delphi » Copying records from one table to another?
Joe Dlhopolsky
![]() Delphi Developer |
Sat, 21 Mar 1998 03:00:00 GMT
|
Joe Dlhopolsky
![]() Delphi Developer |
Sat, 21 Mar 1998 03:00:00 GMT
Copying records from one table to another?
(Sorry to have posted this previously without a subject line.)
I have a DBase IV table from which I want to allow the user to delete Thanks, |
Russell Weetc
![]() Delphi Developer |
Sat, 21 Mar 1998 03:00:00 GMT
Re:Copying records from one table to another?In article: <44ro5p$...@i-2000.com> Joe Dlhopolsky <joed...@i-2000.com> writes: Quote
RecCreate is True then a new record is created in the target table otherwise the current record is written to. It does not require that the tables are the same strutcure but does require that the fields you want to copy hav the function returns a count of the number of fields used..might be useful ? Hope this helps. function DbsCopyRecord(srcTbl, tgtTbl : TTable; RecCreate : Boolean) : Integer; Result := 0; try TFldNames := TStringList.Create; {open the list for field names} tgtTbl.Edit; {set target into edit mode} if RecCreate then tgtTbl.Append; {add a new record if required} {now copy the values from Source to Target.} for i := 0 to (SFldNames.Count - 1) do begin FldExist := False; for c := 0 to (TFldNames.Count - 1) do begin if (UpperCase(SFldNames[i]) = UpperCase(TFldNames[c])) then begin if FldExist then begin end; -- |
Maarten Boele
![]() Delphi Developer |
Tue, 24 Mar 1998 03:00:00 GMT
Re:Copying records from one table to another?In article <457151574...@weetch.demon.co.uk>, Russ...@weetch.demon.co.uk says... Quote
Quote
Quote
- Hide quoted text - - Show quoted text - Quote>ethe same name (and the same type!). Both tables have to be on the form and Quote> inc(Result); also do something like this: Table2.InsertRecord([Table1.Fields[0], Table1.Fields[1], {etc. up to the number kind regards, Maarten |
1. Copy record inside one table
2. Copying records from one table to another ?
3. copying record from one table to another
4. How to: copy a record from one table to another one
5. Copying one record from one table to another
7. copying data from one record to the next when inserting a new record
8. One field, one record Paradox table okay?
9. Copying records in current table to the same table
10. Record not copying from same physical table different logical table