Posts

Showing posts from July 1, 2013

Connect Asp Page to Database

Image
As a developer I faced many problem in connecting database but after two days i realized that it is very easy for me. Okay! i will not waste your time so much and now start this tutorial. 1. While connecting SQL Server to your system if it shows error like this 1856 or something else so you should not worry so much about this. You should restart your SQL Server as run as administrator. and this will solve your problem. But If this is not working then you should search on internet related to your problem. Make Connection String to your database : you can do this by two ways. 1. By using ConfigrationManager 2. Directly give the path to your database. Now first of all see second method. How to get database source path? see this picture if your database is connected  this will help you.   At the right corner you will get your data source path. Do the following steps to get connection: 1. Add namespace  using System.Data.SqlClient; 2. Write connection