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 is the difference between sqldatareader and sqldataadapter?

0 Answers  


Explain About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.

0 Answers  


What is a data control clerk?

0 Answers  


I am fresh graduate, trained in C# .net. How do i answer when interview ask me , Where do you see yourself within 5 years from now?

2 Answers  


How to identify the controls which can be used for binding data?

0 Answers  






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?

0 Answers  


How to pass values into a datatable?

0 Answers  


What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?

0 Answers   CGI,


What is defaultview in datatable?

0 Answers  


what is the syntax code for oldb to connect oracle

3 Answers   IBM,


What is difference between datatable and dataset?

0 Answers  


What are relation objects in dataset and how & where to use them?

1 Answers  


Categories