Log in

View Full Version : Saving a new datatable to the database


vacuit
Aug 14, 2007, 10:15 AM
Visual Basic 2005
I want to save a copy of a datatable (that the user has changed) with a new name back to the database (Access)

I have this code to save a copy with a new name to the dataset... how do I then update the database (without changing the original datatable)? Essentially I want to add a new datatable to the database.

Dim dt As New DataTable
dt = MyDataSet.OriginalDataTable.Copy
dt.TableName = mytextbox.text
MyDataSet.Tables.Add(dt)

thank you!