I have a SQL 2005 Express database that has a table with the fields :
Primary (which is my Primary Key and it AutoInc)
RecsordID (is an Int and allows Null
WorkOrder (is a varChar(50)
I have created a form that has a DataGridView, Bindingsource, TableAdptor, and a BingingNavigator all through the Designers in VB Express 2008
When I add a new row to the table I am wanting to in code take the highest RecordID number and add 1 to it and make that the new rows RecordID value but I can't seem to figure out how to access the last RecordID value in the table.
I can move to that rowwith bindingsource.movelast
I can add values to the cells with the DefaultValuesNeeded Method
I can get it in a textbox but I need it in a variable as an Int so I can do the math
Thank you for any help provided