I am using Devart.Data.MySql V 5.0.22.0 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?
MySqlCommandBuilder does not work
To obtain the update commands use the code like this:
For more information about the MySqlCommandBuilder class, please refer to our online documentation: http://www.devart.com/dotconnect/mysql/docs/ .
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