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

What are the differences between OLEDB and SQLClient Providers?

0 Answers  


What is the difference between data reader and data adapter?

0 Answers  


What is acid in ado.net?

0 Answers  


Write steps of retrieving data using ado.net ?

3 Answers   Keane India Ltd,


What is dataset object? Explain the various objects in dataset.

0 Answers  






How can we check that some changes have been made to dataset since it was loaded?

0 Answers  


Explain how to bind the controls(best practice) comboboxes to the data in the dataset?

0 Answers  


ADO and ADO.NET differences ?

2 Answers   Microsoft,


How to bind the controls(best practice) comboboxes to the data in the dataset?

0 Answers  


How to store data in memory?

0 Answers  


Explain the difference in an abstract class and an interface?

0 Answers  


What are the ado.net objects?

0 Answers  


Categories