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
Does executenonquery return a value?
Describe ado.net object model in detail.
What is data view and variable view?
What is the difference between DataReader and DataSet in ADO.NET?
Which is faster datareader or dataadapter?
What is a control toolbox?
What does datareader object do?
Define connection string?
Explain the role of data provider in ado.net?
What are the data providers used in ado.net
I loaded the dataset with a table of 10 records. One of the records is deleted from the backend, how do you check whether all the 10 records were present while updating the data(which event and steps) and throw the exception 28 can datareader hold data from multiple tables?
What is the current version of entity framework?
List all the steps in order, to access a database through ado.net?
What is the difference between a datareader and a dataset?
What is the difference between dataset and datatable?