How to get oledb connection?

Answers were Sorted based on User's Feedback



How to get oledb connection?..

Answer / 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

How to get oledb connection?..

Answer / guest

oledb provid universal connection strintg .using oledb we
can conntect to any data base.

Is This Answer Correct ?    2 Yes 2 No

How to get oledb connection?..

Answer / jnan

using system.data.oledb

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More ADO.NET Interview Questions

can we have multiple datatables in a datareader ?

18 Answers   Fulcrum Logic, Infosys, Kale Consultants, Ness Technologies,


Using Ado.net, what front ends and back ends can you use?

10 Answers  


What is sql command in ado net?

0 Answers  


What are the benefits of using of ADO.NET in .NET 4.0?

0 Answers  


What provider ADO.net use by default ?

5 Answers   Accenture, BirlaSoft, Wipro,






What is the difference between connected environment and a disconnected environment?

2 Answers  


What are the parameters that control most of connection pooling behaviours?

0 Answers  


What is the difference between oledbreader and datasetwhile connecting?

1 Answers  


Define data access layer?

0 Answers  


How would you connect to database using .NET?

0 Answers  


What is the difference between an ADO.NET Dataset and an ADO Recordset?

0 Answers  


Explain how to call the sql commands asynchronously in ado.net version 2.0?

0 Answers  


Categories