Example:
private void PopulateGridView()
{
//Create the Connection, Command, DataAdapter object and the SQL query
OleDbConnection oConnection = new OleDbConnection("Connection String is here");
String sqlSelectQuery = "SELECT PK_ID, EMP_NAME, EMP_AGE, EMP_SALARY FROM EMPLOYEE";
OleDbCommand oCommand = new OleDbCommand(oConnection, sqlSelectQuery);
OleDbDataAdapter oAdapter = new OleDbDataAdapter(oCommand);
//Create the DataSet object and fill it
DataSet oDataSet = new DataSet();
oAdapter.Fill(oDataSet);
//Check if the DataSet object is empty or not,
//if empty then add a blank row.
if(oDataSet.Tables[0].Rows.Count == 0)
{
oDataSet.Tables[0].Rows.Add(oDataSet.Tables[0].NewRow());
}
//Populate the GridView
gvMyGridView.DataSource = oDataSet;
gvMyGridView.DataBind();
}