cmd = connection.CreateCommand(); string qyery = "select * from employee_details inner join employee_status on employee_details.Employee_Id=employee_status.Emp_Id where employee_status.Emp_Branch_Id=@Emp_Branch_Id and not employee_details.Emp_Type='BM' and not employee_status.Emp_Acc_Stat='DELETED' ";//get the employee account status and emp information simultaneously in the branch of BM cmd.Parameters.AddWithValue("@Emp_Branch_Id", home.empBranchId); cmd.CommandText = qyery; da.SelectCommand = cmd; MySqlCommandBuilder cb = new MySqlCommandBuilder(da); ds.Clear(); int m=da.Fill(ds, "Employee_details");
dbconnector = new DataConnector(); conn = new MySqlConnection(); conn = dbconnector.connect(); MySqlCommand cmd = new MySqlCommand(); cmd = conn.CreateCommand(); string query = "select * from customer_details"; cmd.CommandText = query; try { da.SelectCommand = cmd; MySqlCommandBuilder cb = new MySqlCommandBuilder(da); da.Fill(ds, "customer_details"); MessageBox.Show("filled customer details to dataset "); DataGridView1.DataSource = ds.Tables["customer_details"]; conn.Close(); generatedException = false; } catch (MySqlException ex) { MessageBox.Show("Generated Exception=" + ex.ToString()); generatedException = true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)