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 would you connect to database using .NET?
What is ado oledb and odbc?
What is ado net stands for?
What are the classes in System.Data.Common Namespace?
What are the advantages of using datalist?
How to perform sorting on a table in ADO.NET?
What are datareaders?
How do I delete a row from a DataTable?
Explain advantages of ado.net?
Why is ADO.NET serialization slower than ADO ?
What is bubbled event?
What are the different ado.net namespaces?
What is ado.net objects?
Explain the advantage of ADO.Net?
What connected data?