MySqlCommandBuilder does not work

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 2
Joined: Fri 02 Jun 2006 17:23

MySqlCommandBuilder does not work

Post by bigpoint » Wed 25 Mar 2009 19:03

I am using Devart.Data.MySql V and have a problem with the MySqlCommandBuilder:

Me.Da = New MySqlDataAdapter()
Me.Da.SelectCommand = "SELECT id,name FROM table;"

Dim ObjCb As New Devart.Data.MySql.MySqlCommandBuilder()
ObjCb.Quoted = True
ObjCb = New Devart.Data.MySql.MySqlCommandBuilder(Me.Da)

The commandBuilder does not produce any Commands. Can you help?

Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 26 Mar 2009 15:13

To obtain the update commands use the code like this:

Code: Select all

Using conn As New MySqlConnection("host=db;uid=root;pwd=root;port=3306;database=test")
    Dim da As New MySqlDataAdapter()
    da.SelectCommand = New MySqlCommand("Select deptno,dname from dept", conn)
    Dim commBuilder As New MySqlCommandBuilder(da)
    da.InsertCommand = commBuilder.GetInsertCommand
    da.UpdateCommand = commBuilder.GetUpdateCommand
    da.DeleteCommand = commBuilder.GetDeleteCommand
End Using
For more information about the MySqlCommandBuilder class, please refer to our online documentation: .

Post Reply