public void FillGrid()
{
string connString = "Server =localhost;Port = 3306; Database =lbmtcs; UID =serverUser; Password =";
MySqlConnection Pathway = new MySqlConnection(connString);
string gridView = "SELECT PIN, Status, Cert_Title_No, Owner_Name, Co_Owner, Street, Barangay FROM landrecord"
+"WHERE PIN = @pin, Status = @Stat AND Cert_Title_No = @Cert AND Owner_Name = @Owner AND Co_Owner = @CO AND Street = @St AND Barangay = @Bar";
MySqlCommand grid = new MySqlCommand(gridView, Pathway);
MySqlDataAdapter MyDA = new MySqlDataAdapter();
MySqlCommandBuilder cmd = new MySqlCommandBuilder(MyDA);
MyDA.SelectCommand = grid;
DataTable table = new DataTable();
MyDA.Fill(table);
BindingSource bSource = new BindingSource();
bSource.DataSource = table;
dGrid.DataSource = bSource;
}
MySqlException 未处理:
命令执行期间遇到致命错误。
代码有什么问题?
我正在选择一些列来显示在我的数据网格中。