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 was unhandled:
Fatal error encountered during command execution.
Whats wrong in the code?
I'm selecting some columns to show in my datagrid.