gbogea, Thank you for your reply and continued assistance...
These are the steps I took in going through ScottGu's blog:
1. create new .xsd (ds_Orders_3.xsd)
2. create primary select statement/method for TableAdapter via TableAdapter Wizard:
ds_Orders_3
SELECT company, orderID
FROM Orders_Table
3. Create Insert Method:
InsertCompanyReturnOrderID
INSERT INTO [Orders_Table] ([company]) VALUES (@company);
SELECT SCOPE_IDENTITY()
4. change execute mode from NonQuery to Scalar. save.
***This is where ScottGu's blog ends*** Scottgu's blog (allbeit is very helpful in many ways) from this point on takes a different direction than I can follow. He writes out an insert script in VB, and I'm using a detailsView control.
When I first attempted to use ScottGu's blog I tried a handful of variations (found in other posts) to try and complete the process. I was unsuccessful.***
_________________________________________________________________________
I continue with these steps
5. Created an .aspx (test_3.aspx)
6. dropped a ajax script-manager on the page.
7. dropped an ajax update-panel onto the page.
8. dropped a table into the update-panel.
9. dropped a DetailsView control into the table (DetailsView1).
10. selected an object-datasource (ObjectDataSource1).
11. selected my TableAdapter ds_Orders_3TableAdapters.Orders_TableTableAdapter(Int32 company),returns Object.
12. clicked next and clicked the "Insert" tab and selected my second query in the TableAdapter (InsertCompanyReturnOrderID(Int32 company), returns Int32. (completing the datasource wizard)
13. selected "enable-inserting". save.
- "Run in Browser"
- click "New" linkButton (to insert a new record)
- type "3" for some random (companyID) data
- click the "Insert" linkbutton.
The record inserts into the database fine BUT after the postback the OrderID value is always a value of "1" instead of the ID of the my "just" inserted record.