Answer Posted / 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 |
Post New Answer View All Answers
How to bind the controls(best practice) comboboxes to the data in the dataset?
What are advantages of microsoft-provided data provider classes in ado.net?
What is the difference between DataReader and DataSet in ADO.NET?
What is Data view?
How can we load multiple tables in to dataset?
How do you update a dataset in ado.net and how do you update database through dataset?
What are the main differences between classic ado and ado.net?
How to identify the controls which can be used for binding data?
What is ado.net tutorial?
Which architecture does Datasets follow?
how to create a quiz software using 4 options to answer and how to check with answers in the database and award marks....
What is the difference between SqlCommand and SqlCommandBuilder?
Which property is used to check whether a DataReader is closed or opened?
How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?
What is a datareader object?