I have a problem with returning the new id of the newly inserted item in database back to C# code(i need it for displaying the new item in the form)... My stored procedure is setup, so it returns scope_identity(tried with select and output as well). But when I run
int newID = customerTableAdapter.Insert(values...)
new id is set to -1, are there some properties that need to be configured in the tableAdapter parameters collection(I tried setting the collumnName and sourceCollumn to CustomerID but nothing seems to work), so that the fuction will return the new identity, becouse the SP when run in SQL Management Studio returns the new id?
Thanks in advance...
Edited 1-Sep-12 23:32pm
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)