How to get oledb connection?
Answers were Sorted based on User's Feedback
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 |
Answer / guest
oledb provid universal connection strintg .using oledb we
can conntect to any data base.
Is This Answer Correct ? | 2 Yes | 2 No |
Which method do you invoke on the DataAdapter control to load your generated dataset with data?
5 Answers IBM, Veegyapan Impacts,
What does ado stand for in ado.net?
How can we serialize the dataset object?
What is ado and dao?
What are the advantages and drawbacks of using ado.net?
What is ole access?
OleDbDataAdapter ole=new OleDbDataAdapter(new OleDbCommand ("select * from login",oleDbConnection1)); OleDbCommandBuilder cmd=new OleDbCommandBuilder(ole); ole.Fill(dataSet11,"login"); DataRow drow=dataSet11.Tables ["login"].NewRow(); drow[0]=textBox1.Text; drow[1]=textBox2.Text; drow[2]=textBox3.Text; dataSet11.Tables["login"].Rows.Add (drow); ole.UpdateCommand=cmd.GetUpdateCommand(); ole.Update(dataSet11,"login"); MessageBox.Show("one row added"); this gives exception.how to solve it
Define data adapter?
Define Execute Reader?
What is an orm, and why would you use one instead of plain old ado.net?
If we want to connect to many databases in dataaccess layer such as MSAccess,Sql server,oracle means not to a particular database depends on condition we have to connect to appropriate database in this scenario if we without changing code Ho wdo you handle this situation?
What is ado.net explain with diagram?