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 is the meaning of object pooling?
Which ado.net object is very fast in getting data from the database?
Does entity framework use ado.net?
What is connection in ado.net?
What is Data view?
Define ado.net?
What are the advantages using ado.net?
What is a data control clerk?
What is the difference between sqldatareader and sqldataadapter?
What are the data providers in ADO.NET framework?
List all the steps in order, to access a database through ado.net?
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?
What are two important objects of ADO.Net?
What is data adapter in ado.net with example?
What are the several execute methods of ado.net?