TableAdapter Insert return value

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top