Previous Topic Next topic Print topic


Tutorial: Create an ADO.NET Connection

Catalog an ADO.NET database connection and connect to it using the OpenESQL Assistant.
Requirements
Before attempting this tutorial, you must complete the following tutorials in the order listed:
  • Tutorial: Enable SQL CLR Integration
  • Tutorial: Create a Sample Database
  • Tutorial: Create and Configure a Database Project
Phase 1: Start OpenESQL Assistant
  • From the Visual Studio IDE, click View > Micro Focus SQL Tools > OpenESQL Assistant.
Phase 2: Catalog an ADO.NET Connection
  1. From the tool bar in the OpenESQL Assistant, click the ADO.NET Connection Editor icon Create New Query.
  2. Click Settings Menu icon > Save > All framework/availability combinations; then do one of the following:
    • If All framework/availability combinations is checked, proceed to the next step.
    • If All framework/availability combinations, click it to select it; then proceed to the next step.
  3. Click Settings Menu icon > Framework and ensure that 4.0, 4.5, 4.6 is checked.
  4. Click Add to create a new database connection; then click Next.
  5. In the Data Source Name field, type SQLCLRTutorial; then click Next.
  6. On the .NET Data Providers page, select SqlClient Data Provider; then click Next.
  7. In the Data Source field, type . (dot) to specify your local SQL Server instance.
  8. In the Initial Catalog field, type SQLCLR_Test, which is the name of your SQL Server database.
  9. Do one of the following to set authentication for your SQL Server instance:
    • If you want to connect using Windows authentication (recommended), change the value for the Integrated Security key to True.
    • If you want to connect by providing SQL Server-specific login credentials, type your SQL Server user ID and password into the Value fields for the User ID and Password keys respectively.
  10. Click Next, and then Finish.
  11. After the new connection appears on the main window of the ADO.NET Connection Editor, click Test to verify that the connection works.
  12. Click the x icon in the upper right corner of the ADO.NET Connection Editor main window to close it.
Phase 3: Connect to your SQL Server Instance
  1. On the OpenESQL Assistant, uncheck all listed data source names, if any.
  2. From the tool bar, click the Refresh list of data sources icon Create New Query.
  3. Check SQLCLRTutorial to make the connection.

This concludes this tutorial. Please continue with Tutorial: Code a SQL CLR Stored Procedure using OpenESQL Assistant.

Previous Topic Next topic Print topic