Answer Posted / senthil kumar
using OLEDB connection we can connect the MS-ACCESS,Sql
Server,Oracle.
here i given the coding for connect the oledb connection
OleDbConnection con = new OleDbConnection();
con.ConnectionString="Provider=Microsoft.Jet.OleDb.4.0;Data
Source=databasenamewithpath;";
con.Open();
then u can use the dataset or datareader
OleDbCommand cmd = new OleDbCommand(sql,con);
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
OleDbDataReader reader;
reader = cmd.ExecuteReader();
OleDbDataAdapter oda = new OleDbDataAdapter(sql,con);
DataSet ds = new DataSet();
oda.Fill(ds,"tablename");
i hope that these are enough.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What are the key events of sqlconnection class?
Explain how to create dynamic gridview?
What is ado circle?
In how many ways we can retrieve table records count? How to find the count of records in a dataset?
What is an example of ordinal data?
How to identify the updated rows in a dataset?
How to enable and disable connection pooling?
what is the difference betwen typed dataset and untyped dataset?in general which dataset can we use in programming?
Explain what are the steps to connect to a database?
can we create synonymn in ms access,sql server,my sql if so explain me with example
What is difference between datagridview and datagrid control in winforms?
Is datareader faster than datatable?
What is the difference between dataset and datatable?
Which method in OLEDBAdapter is used to populate dataset with records?
How to creating a SqlCommand Object?