I have a strongly typed dataset, called "Customers" for example.
My user chooses to create new customer, i have no existing dataset, so i create a new instance of my Customers dataset.
and instantiate a new CustomersDataRow.
At this point ive not Filled my ds as I know im creating a new record and dont want to make an unneccessary call to the db.
I populate my NewRow with the required data.
How do I now insert this row into the actual database? Im trying to pass it to my attempt at a data access layer (which currently has no reference to the original dataset). I seem to be stuck with a detached datarow and cant figure out how to commit it to the database?
Im sure this shouldnt be as difficult as im making it but i seem to be having a slow day so any help much appreciated.
Regards,
Dan
My user chooses to create new customer, i have no existing dataset, so i create a new instance of my Customers dataset.
Code:
dim dsCustomers as new Customers
Code:
dim drCustomer as new dsCustomers.Tables(0).NewRow()
I populate my NewRow with the required data.
How do I now insert this row into the actual database? Im trying to pass it to my attempt at a data access layer (which currently has no reference to the original dataset). I seem to be stuck with a detached datarow and cant figure out how to commit it to the database?
Im sure this shouldnt be as difficult as im making it but i seem to be having a slow day so any help much appreciated.
Regards,
Dan