为什么MySQLDriverCS.dll没有象mssql一样有:SQLCommandBuilder
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data;
using MySQLDriverCS;
........
//--------------------------------------------------------------------------------------------
private void btnSave_Click(object sender, EventArgs e)
{
try
{
Common.SQLtran = (MySQLTransaction)Common.SQLConn.BeginTransaction();
objdt_Command.Transaction = Common.SQLtran;
this.BindingContext[objdt_City].Position = this.BindingContext[objdt_City].Count - 1;
this.BindingContext[objdt_City].Position = 0;
objdt_Adater.Update(objdt_City);
objdt_City.AcceptChanges();
Common.SQLtran.Commit();
MessageBox.Show("存檔完成", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
Common.SQLtran.Rollback();
objdt_DataSet.RejectChanges();
MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
//Initialize
objdt_City.Clear();
//**************
FuncRetrieve();
//**************
}