How to get the new oledb connection of oracle in database
programming?



How to get the new oledb connection of oracle in database programming?..

Answer / srikant dwibedi

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");

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

What is maximum pool size in ado.net connection string?

0 Answers  


describe about the ado.net object model

4 Answers   TCS,


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.

2 Answers   Fulcrum Logic, Satyam,


What is the return type of executescalar?

0 Answers  


What is the difference between ado.net and entity framework?

0 Answers  






Explain the difference between data reader and data set?

0 Answers  


Can you edit data in the Repeater control?

9 Answers  


What provider ado.net use by default? Explain the role of data provider in ado.net?

0 Answers  


How to Handle the exceptions in Sqlsrver2000

3 Answers   SQL Star,


What providers does Ado.net uses?

0 Answers  


What are the two fundamental objects in ADO.NET?

8 Answers   Ksb, TCS,


What is the provider being used to access oracle database?

0 Answers  


Categories