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...

What are the steps in connecting to database?

Answer Posted / chaitanya.k

1. U need to declare name space according to which database
u need to connect.

2. U can declare connection string in two ways.

1. U can declare in web.config in appsettings.
2. U can delare directly in code behind or in inline code

These can delared by using connection string.

3. Then u can do the operations by open the connection.
4. After complete all ur transcations u need to close the
database.

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define connection string?

1013


What are typed and untyped dataset?

1042


What is the difference between Datareader and Dataset?

1026


What are the disadvantages of using datalist?

971


Which is faster datareader or dataadapter?

933


Describe briefly an ADO.NET Dataset ?

1003


How would you connect to a database by using .NET?

890


What are dataproviders?

902


What is shadow copy?

933


What is connection in ado.net?

889


Is it possible to edit data in Repeater control?

888


What are the advantages and disadvantages of using datalist?

984


What are the advantages of using datalist?

961


Can we load multiple tables in a dataset?

1062


Define Execute Reader?

1016