Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to get oledb connection?

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


Please Help Members By Posting Answers For Below Questions

What is shadow copy?

933


What are the benefits of ADO.NET?

1061


Which keyword is used to accept variable number of parameters?

1062


What is a data control clerk?

979


What does executenonquery () method return?

878


What does ole stand for in excel?

1062


What is ado.net and its features?

916


What is the executescalar method?

1018


What is the hierarchy of data in databases?

895


Explain the advantage of ADO.Net?

937


Which parameter of ConnectionString is used to specify the name of the database?

985


What is the use of adodc?

939


What are the main differences between classic ado and ado.net?

969


What are the core objects of ADO.NET?

979


How do I delete a row from a DataTable?

1076