CopyDataFrom


Author
Message
Ian Hammond
Ian Hammond
StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)
Group: Forum Members
Posts: 57, Visits: 277
I wish to make a copy of some data by loading the original, changing the name of a queue that it belongs to and writing it back to the BO but preserving the original data. When I look at the individual rows, the data is changed, but nothing seems to be saved into the backend database. Have I misinterpreted the use of CopyDataFrom: Please see attached code snippet

Many thanks for any assistance.

this.localPrintQBO.FillWithQueueItems(Global.CurrentUserId, Global.CurrentTableId, this._currentPrintQ);

DataTable loTable = new DataTable();

loTable = this.localPrintQBO.CurrentDataTable.Clone();

foreach (DataRow qRow in this.localPrintQBO.CurrentDataTable.Rows)

{

loTable.ImportRow(qRow);

}

//Change the copy to the target print queue

foreach (DataRow qRow in loTable.Rows)

{

qRow["QName"] = this.cboTargetQ.Text.ToString();

}

this.localPrintQBO.CopyDataFrom(loTable, BusinessCloneDataType.AppendDataToTableFromCompleteTable);


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search