May 27, 2002 #1 woodyinoz IS-IT--Management Jan 8, 2002 215 GB Hi all, Just a quick simple question. What code would I use to copy all of the information from table1 into table2 (apphending the data to table2) and then empty table1? Thanks, Woody.
Hi all, Just a quick simple question. What code would I use to copy all of the information from table1 into table2 (apphending the data to table2) and then empty table1? Thanks, Woody.
May 27, 2002 #2 jpbrault Programmer Feb 21, 2002 11 CA var tbl table endvar tbl.attach("tablr1.db" tbl.add("table2.db", true, true) tbl.unattach() -> In order to work properly, your tables must be indexed. Upvote 0 Downvote
var tbl table endvar tbl.attach("tablr1.db" tbl.add("table2.db", true, true) tbl.unattach() -> In order to work properly, your tables must be indexed.
May 28, 2002 Thread starter #3 woodyinoz IS-IT--Management Jan 8, 2002 215 GB Incase anyone needed to do this in the future I thought I'd post the solution I found to my problem. Transfer: method pushButton(var eventInfo Event) var dt DataTransfer endVar dt.SetSource ( "Temp Import.db" ) if dt.getSourceType ( ) = DTASCIIFixed Then dt.loadDestSpec ( "SpecTable" ) EndIf dt.setDest ( "PartReport.db" ) if not dt.getAppend () then dt.setAppend ( True ) endif dt.transferData ( ) endMethod Empty: method pushButton(var eventInfo Event) Empty("PartReport.db" endMethod I hope this might help people in the future. Woody. Upvote 0 Downvote
Incase anyone needed to do this in the future I thought I'd post the solution I found to my problem. Transfer: method pushButton(var eventInfo Event) var dt DataTransfer endVar dt.SetSource ( "Temp Import.db" ) if dt.getSourceType ( ) = DTASCIIFixed Then dt.loadDestSpec ( "SpecTable" ) EndIf dt.setDest ( "PartReport.db" ) if not dt.getAppend () then dt.setAppend ( True ) endif dt.transferData ( ) endMethod Empty: method pushButton(var eventInfo Event) Empty("PartReport.db" endMethod I hope this might help people in the future. Woody.