B
Benson
I create a typed dataset by drag'n'drop in VS2005 (VB). I can use FillBy or
GetDataBy methods to retrieve the record. The code is as follows:
dataTable = tableAdapter.GetDataByCode(KeyFieldValue)
MtrUnitBindingSource.DataSource = dataTable
'user edits the record
'press ok button to save
MtrUnitBindingSource.EndEdit()
tableAdapter.Update(dataTable)
==> it works perfectly in find/edit/update mode.
Question:
1. I find difficulty in New/Insert mode. How to add a new row and do the
insert to the database?
2. If in the view mode (only user views the record), how to set datatable to
readonly?
Benson
VB2005
GetDataBy methods to retrieve the record. The code is as follows:
dataTable = tableAdapter.GetDataByCode(KeyFieldValue)
MtrUnitBindingSource.DataSource = dataTable
'user edits the record
'press ok button to save
MtrUnitBindingSource.EndEdit()
tableAdapter.Update(dataTable)
==> it works perfectly in find/edit/update mode.
Question:
1. I find difficulty in New/Insert mode. How to add a new row and do the
insert to the database?
2. If in the view mode (only user views the record), how to set datatable to
readonly?
Benson
VB2005