Get Unique ID

May 11 2006 9:27 AM
Hello,

I am using the following code for inserting a record in a sql server database:

DataRow newCustomersRow = dataSet1.Tables["tMailings"].NewRow();
newCustomersRow["MailingName"] = fieldName.Text.ToString();
newCustomersRow["MailingEmail"] = fieldEmail.Text.ToString();
dataSet1.Tables["tMailings"].Rows.Add(newCustomersRow);

mySqlDataAdapter.RowUpdated += new SqlRowUpdatedEventHandler(handleRowUpdated);
mySqlDataAdapter.Update(dataSet1, "tMailings");
mySqlDataAdapter.RowUpdated -= new SqlRowUpdatedEventHandler(handleRowUpdated);

After the update I want to retrieve the UniqueId "MailingId" from the table tMailings.
I can't get this to work!!!

Can anybody help me??

TNX


Answers (1)