AD
Administrator
Syncfusion Team
December 12, 2007 12:26 PM UTC
You might try setting the DataAdapter.SelectCommand property if you are querying the same DataTable that is the grid's DataSource.
private void button1_Click(object sender, EventArgs e)
{
string connString = @"Provider=Microsoft.JET.OLEDB.4.0;data source=" + GetPath(@"Data\nwind.mdb");
string sqlString = "SELECT EmployeeID, FirstName, LastName, Photo, Photo as Photo1 FROM Employees where [LastName] LIKE 'King'";
OleDbConnection connection = new OleDbConnection(connString);
this.dataAdapter.SelectCommand = new OleDbCommand(sqlString, connection);
this._dataSet.Tables["Employees"].Clear();
this.dataAdapter.Fill(_dataSet, "Employees");
connection.Close();
}