How to get the new oledb connection of oracle in database
programming?
Answer Posted / 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 View All Answers
What is the difference between dataset and datatable?
What is difference between datatable and dataset?
How to read data with the sqldatareader ?
What is the difference between OLEDB Provider and SqlClient?
How to generate a single aggregate?
What is difference between executequery and executeupdate?
Can we create Synonymns in MS Acess,My Sql Server,Sql Server? But iam we can create in oracle!
What are the namespaces used in ADO.Net to connect to a database?
Compare Data Reader & Dataset in ado.net?
How can we add/remove row's in "datatable" object of "dataset"?
Explain how to create dynamic gridview?
What is read only and forward only in ado.net?
How to retrieve the user id which is provided while windows authentication?
Explain how to pass multiple tables in datasets simultaneously?
What is the meaning of executenonquery?