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
Define table relations?
What is shadow copy?
Explain the basic use of "dataview" and explain its methods.
What is difference between Dataview and Datatable?
What is executequery?
What is the executescalar method?
Give an example that shows how to execute a stored procedure in ado.net?
How can we add relation between tables in a dataset?
What is Data Provider?
What are the objects of ado.net?
Explain the dataadapter class in ado.net?
What is the return type of executescalar?
What are the methods of XML dataset object?
What are the different ado.net namespaces?
What is datasource in ado.net?