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 are the key events of sqlconnection class?

1191


Explain how to create dynamic gridview?

978


What is ado circle?

1135


In how many ways we can retrieve table records count? How to find the count of records in a dataset?

1006


What is an example of ordinal data?

1139


How to identify the updated rows in a dataset?

1017


How to enable and disable connection pooling?

1053


what is the difference betwen typed dataset and untyped dataset?in general which dataset can we use in programming?

1015


Explain what are the steps to connect to a database?

974


can we create synonymn in ms access,sql server,my sql if so explain me with example

2084


What is difference between datagridview and datagrid control in winforms?

1027


Is datareader faster than datatable?

964


What is the difference between dataset and datatable?

1003


Which method in OLEDBAdapter is used to populate dataset with records?

1023


How to creating a SqlCommand Object?

1136