o-mheien@hdsoftware.no
Active member
- Joined
- Feb 6, 2007
- Messages
- 27
- Programming Experience
- 10+
Hi there
In my application I have declared a tableadapter and a datatable:
then in the code I want to add and edit a record and I do like this:
InsertUsingID is a method created using the built in Dataset designer.
Would you say this is the correct way to do this? Is there a bether way doing this?
Any comments would be helpfull
Thanx
Ole
In my application I have declared a tableadapter and a datatable:
VB.NET:
MyTableTA as new DatasetTableAdapters.MyTableTableAdapter
MyTableDT as new DatasetTableDatasets.MyTableDataset
VB.NET:
dim NewID as GUID.NewGuid.ToString
MyTableTA.InsertUsingID(MyTableDT,NewID)
MyTableTA.fill(MyTable.DT)
dim CurrentRecord as MyTableDT.GetByID(NewID)
dim EditForm as new frmMyTable(CurrentRecord)
if EditForm.ShowDialog() = DialogResult.OK
MyTableTA.Update(CurrentRecord)
End If
Would you say this is the correct way to do this? Is there a bether way doing this?
Any comments would be helpfull
Thanx
Ole