oops! the code should read like thisCode:private bool BindSearchData(string strSearchSql) { OleDbConnection scnnNW = new OleDbConnection(SQL_CONNECTION_STRING); OleDbCommand scmd = new OleDbCommand(strSearchSql, scnnNW); OleDbDataAdapter sda = new OleDbDataAdapter(scmd); DataSet ds = new DataSet(); if (sda.Fill(ds) == 0) {return false;} dgCompany.DataSource = ds; dgCompany.DataBind(); }





Reply With Quote