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 are the two fundamental objects in ADO.NET?

8 Answers   Ksb, TCS,


What is the use of SqlCommandBuilder?

0 Answers  


How to create data relations?

0 Answers  


What is the difference between data grid and data repeater?

0 Answers  


What does ole stand for in excel?

0 Answers  






What is dao and ado?

0 Answers  


What are the drawbacks of using ado.net?

0 Answers  


What is ado object model?

0 Answers  


Explain different methods and Properties of DataReader which you have used in your project?

2 Answers  


Do you use stored procedure in ado.net?

0 Answers  


What is a column variable?

0 Answers  


What is the difference between Datareader and Dataset?

0 Answers  


Categories