thx tang, i got around it this way:
use "SELECT Max(staff_id) FROM staff" to retrieve the latest staff_id
format (staff_id +1) to ("000")
this.staffBindingSource.AddNew();
give this value to the databound component staff_noTextBox.text
this.staffTableAdapter.Update(dataset1.staff)
This is the most straightforward way for me atm, i used ACCESS 2003 db for the sake of simplicity because the size of the project is fairly small,
but i found that it's quite different to mssql stuff.
|