Before you can connect to the SQL Server database you created earlier, you must catalog it using the ADO.NET Connection Editor.
- Requirements
- Before attempting this tutorial, you must complete the following tutorials in the order listed:
- Tutorial: Create a SQL Server Database
- Tutorial: Create and Configure a Visual Studio Project
- Tutorial: Set OpenESQL Assistant Configuration Options
- Phase 1: Start the OpenESQL Assistant
- You can start the OpenESQL Assistant from the Start menu or from within
Enterprise Developer. In this tutorial, we opt to start the OpenESQL Assistant from within
Enterprise Developer.
- In
Enterprise Developer, click
View > Micro Focus SQL Tools > OpenESQL Assistant.
- Phase 2: Start the ADO.NET Connection Editor
- You can start the ADO.NET Connection Editor from your desktop's
Start menu, from the
View menu in
Enterprise Developer, or from within the OpenESQL Assistant. Here, we start it from within the OpenESQL Assistant.
- From the OpenESQL Assistant, click
ADO.NET Connection Editor.
- Phase 3: Catalog the OESQLDemo Connection
- In this phase, we catalog a 32-bit (default) connection to our SQL Server database.
Important: If you are running on a 64-bit machine, you must catalog a 64-bit connection in addition to the 32-bit connection. Both connections have the same data source name. To do this, complete all of the steps in this phase, and then repeat the steps of this phase with the following change:
- Before performing step
1, on the main window, click
Settings > Availability > 64 bit.
- On the main window of the ADO.NET Connection Editor, click
Add. This starts the Add an ADO.NET Connection wizard.
- Click
Next.
- In the
Data Source Name field, type
OESQLDemo, which is the name of your connection; then click
Next.
- In the .NET Data Providers grid, select
SqlClient Data Provider; then click
Next.
- Modify the following fields on the
Connection Settings grid, providing the appropriate values:
Field
|
Value
|
Data Source
|
(local)
|
Initial Catalog
|
OESQLDemo
|
Integrated Security
|
True
|
- Click
Next to review your settings.
- Click
Finish to add the new connection. This returns you to the main window.
- Click
Test to ensure the connection works properly; then click
OK to clear the message.
- Phase 4: Close the ADO.NET Connection Editor
-
- To close the ADO.NET Connection Editor, click the close button
in the upper right corner of the main window. This returns you to the OpenESQL Assistant, which now lists the
OESQLDemo connection.
- Phase 5: Refresh the Database Connection
- For Visual Studio to recognize the connection you have cataloged, you must refresh it in the Server Explorer.
- From the Visual Studio IDE, open the Server Explorer.
- Right-click the connection listed for OESQLDemo, and select
Refresh.
This completes the tutorial. Next, please complete
Tutorial: Build and Test a Query.