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 microsoft ado.net?
What are the features of ado.net?
What is openrowset?
What are the advantages and drawbacks of using ado.net?
How to pass multiple tables in datasets simultaneously?
What is different between sqlcommand object and command behavior object?
What is linq and entity framework?
oledbdataadpter with ms access in c#.net giving exception System.Data.OleDb.OleDbException while writing adapter.update(dataset,"tabname"); how to update the database from dataset?
What is basic use of data view?
Explain the advantage of ADO.Net?
Compare Data Reader & Dataset in ado.net?
can we create synonymn in ms access,sql server,my sql if so explain me with example
If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?
What is the difference between linq and ado.net?
Where is adodb dll located?