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
Is ado.net dead?
What is the use of adodc?
How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?
Does executenonquery return a value?
What is XML serialization
Describe briefly an ADO.NET Dataset ?
Compare Data Reader & Dataset in ado.net?
How to identify the updated rows in a dataset?
What are the advantages and disadvantages of using datalist?
What is ado.net objects?
What is the significance of CommandBehavior.CloseConnection ?
Explain the overview of ado.net architecture?
How to retrieve the user id which is provided while windows authentication?
What is difference between dataset and datatable?
What is the difference between dataset and datatable?