TableAdapter Insert return value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am using the new table adapter in Visual Studio 2005. Its GREAT! I just
can not figure out how to configure the Visual Designer to return an
@@Identity value to me from a newly inserted row. My code fragment is

OrderDataSetTableAdapters.OrdersTableAdapter orderAdapter
= new OrderDataSetTableAdapters.OrdersTableAdapter();

orderAdapter.InsertOrderHolder
(
OrderDS.Orders[0].EmployeeID,
OrderDS.Orders[0].OrderDate,
OrderDS.Orders[0].OrderPromiseDate,
OrderDS.Orders[0].OrderStatus
);

After the Insert completes I need the Indentity Seed column value returned
which in my case is the OrderNumber for the newly inserted order.

Any help is greatly apprecaited and thanks in advance.
James
 
Back
Top