I don't really have any idea but I have done this for you, but by using SqlConnection,SqlAdapter. Control . you can change your own to satisfy this .
Also I have submit full example ( from DEITEL C# How to Program book ) on (OLE) and also the access data base.
Code:
// this method for none query ( insert,delete,update)
public void EditingQuery (string NonQuery)
{
try
{
System.Data.SqlClient.SqlCommand Command = new System.Data.SqlClient.SqlCommand();
Command.Connection = this.sqlConnection1;
Command.CommandText = NonQuery;
Command.Connection.Open();
Command.ExecuteNonQuery();
Command.Connection.Close();
}
catch (System.Exception ex )
{
// Session.Add("Error","EditingQuery:"+ex);
}
}
// this method for query, all you have to do is to submit the query like
// string query = " SELECT * FROM Mytable";
// Query(query);
public void Query ( string query)
{
try
{
this.sqlConnection1.Open();
this.dataSet1.Clear();
this.sqlDataAdapter1.SelectCommand.CommandText= query;
this.sqlDataAdapter1.Fill(dataSet1,"table");
this.sqlConnection1.Close();
}
catch (System.Exception ex )
{
// Session.Add("Error","Query:"+ex);
}
}