A DataTable with new inserted rows
Posted by: Werner Schneider
Date: May 24, 2007 07:25AM

Hi. I add some rows to a DataTable with dataTable.Rows.Add and fill these rows with values. Then I save the rows:

DataTable changes = null;
changes = this.GetChanges();
if (changes != null)
    int nRowsUpdated = mySqlAdapter.Update(changes);

The table I'm updating has a auto_increment field. I know I could use m_mySqlAdapter.UpdateCommand.LastInsertedId to get ONE Id, but I need to get all Ids of all inserted rows. The best solution would be if it's possible to load all the inserted Rows into one DataTable. What would be the way to do so?

Options: ReplyQuote


Subject
Written By
Posted
A DataTable with new inserted rows
May 24, 2007 07:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.