![]() |
Connection to a Microsoft SQL Server |
|
Working from the Server |
|
After installing Microsoft SQL Server, you can use it. To perform an operation on a database server, you must establish a connection to it. To do this, you have to log on to the server. You have various options. If you are working directly on the server:
|
The Connect To Server dialog box allows you to identify yourself (or the account you will use) to establish a connection with a server that is running Microsoft SQL Server. You must provide the necessary credentials. You can use Windows Authentication. Here is an example:
Alternatively, you can use an existing SQL Server account. To do this, select SQL Server Authentication from the Authentication combo box. Enter a username in the Login combo box and enter a password in the corresponding text box:
Once you are ready, click Connect.
To be as flexible as possible, ADO.NET allows you to work with various types of databases. This also means that when you create an application, you must certainly first specify the type of database system you would be using. If you are creating a graphical database application using Microsoft Visual Studio, you do not have to first explicitly log on to a Microsoft SQL Server. You can establish a connection from Microsoft Visual Studio. To do this, first display the Server Explorer window. To display the Server Explorer, on the main menu, you can click View -> Server Explorer. To create a new connection, you can right-click the Data Connections node and click Add Connection...
The Add Connection dialog box would display:
As another technique, to create a connection, on the main menu, you can click Data -> Add New Data Source... In the Data Source Configuration Wizard, click Database and click Next:
In the second page of the wizard, you can click New Connection to open the Add Connection dialog box. |
|
|
||
| Previous | Copyright © 2007-2009 FunctionX, Inc. | Next |
|
|
||