Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open the sql server in vs .net 2003

Status
Not open for further replies.

chenshch

Technical User
Jun 9, 2004
8
CN
i cannot open the sql server in vs .net 2003
what's the possible problem?
 
Tools->Connect To DataBase
Provider tab ->Microsoft OLE DB Provider for SQL Server
Connection tab ->Select or enter server name :
-type localhost if the SQL database is running on your machine
- type the server name where SQL is running. This should be on the network where is your machine.
Check "Use a specific user name and password"
Fill User Name and Password that should be defined in that SQL
Check "Select the data base files as a database name " , type there the name of the Database
Click Test Connection
If you get "Test connection succeeded" that means you are able to connect.
If not, the reasons could be:
-the server name is wrong or cannot be reached. In this case try Tools->Connect to Server;
-the SQL is not running on that machine
-the selected database does not exists
-username/password are wrong
If the test is Okay then you can use Designer to generate the SqlConnection object and the connection string just you drag the item from the Server Explorer ->Data Connection tree onto your form.
You should connect in this case from that code.
-obislavu-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top