Update whole datatable in database

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, I have my MDB with a Catalogue table. Im reading this table to DataTable for programmatically update.Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:1.mdb")
Dim cmd As New OleDb.OleDbCommand With {.Connection = cn,
.CommandText = "SELECT * FROM Catalogue"}
Dim DBCatalogue As New DataTable

cn.Open()
DBCatalogue.Load(cmd.ExecuteReader)
DBCatalogue.AcceptChanges()
cn.Close()
So, now I do have DBCatalogue and use it for my purpose. After that I need to update whole table in my MDB at once! Not line by line. As I understand, there should be some adapter, but I cant get, how it is work.
Please, notice, I DO NOT use any DataSet. Only DataTable and need to update only DataTable, NOT DataSet!!!

View the full article
 
Back
Top