0

I have this code:

Dim cb As OleDb.OleDbCommandBuilder
        Try
            cb = New OleDb.OleDbCommandBuilder(daDocuments)
            daDocuments.Update(CType(bdsDocuments.DataSource, DataTable))
            MessageBox.Show("The data load has finished...", "DBF Load")
        Catch ex As Exception
            MessageBox.Show("1.- " + ex.Message)
        End Try

but, the OleDbCommandBuilder don't create the updatecommand and hence it doesn't work... any ideas?

2
Contributors
1
Reply
3
Views
10 Years
Discussion Span
Last Post by manal
0

daDocuments.Update(CType(bdsDocuments.DataSource, DataTable))

I think this not right , daDocuments.Update takes two argument one of them is dataset and the other is table

OleDbDataAdapter1.Update(DataSet11, "table_name")

also you can use OleDbCommandBuilder when DataTable maps to a single database table(means database table is not result of join operation)

Edited by diafol: fixed formatting

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.