Create a SQL query using ADO.NET Accelerator

Now that you have specified the application type and configured the your application with the ADO.NET Accelerator settings you need to create the SQL queries that will be used in your application. To create the SQL queries you will use the SQL Editor. In order to work with the SQL Editor you need to create an ADO.NET Accelerator project first.

Creating an ADO.NET Accelerator project

  1. Open the SQL Editor Manager. Click on Start/All Programs/SqlNetFramework/SQL Editor Manager.
  2. The SQL Editor Manager is displayed.
  3. Open the SqlNetFramework Project Manager. On the menu click on File, then on Project Manager...
  4. The SqlNetFramework Project Manager is displayed.
  5. Select the New… button to create a new project.
  6. The Add/Edit Project dialog must be displayed. Assign the field values as shown in the table below.
    Field name Description Value
    Project name. Name used to identify the new project. DemoProject.
    Web.config/WinApp.config file location. Location where the configuration file is located. C:\DemoProject\web.config or C:\DemoProject\App.config
    Machine.config file location. Location where the machine.config file is located. The machine.config file is used to specify the SqlNetFramework configuration settings that will be shared between multiple applications. (Leave empty)
    Project root path. Location where the ASP.NET web project/Windows Forms project is located. This value is used at design-time to identify the location of those items in the configuration file that have specified a relative location. C:\DemoProject.
  7. Click OK to save changes.
  8. Check the DemoProject item and click the close button to close the SqlNetFramework Project Manager dialog.

Creating a select SQL query using the SQL Editor

  1. Open the SQL Editor dialog. On the menu click on File, then on SQL Editor...
  2. The Connection items dialog is displayed automatically. The Connection ID dropdown list displays the connections available in the active project.
  3. Select DemoDb from the Connection ID dropdown list.
  4. Click OK.
  5. The SQL Editor dialog is displayed. It is connected to the DemoDb SQL data store. Now you can insert, edit and delete SQL statements from the DemoDb SQL data store.
  6. Click the Add button . The Add/Edit SQL statement dialog must be displayed.
  7. Select Text from the Type dropdown list.
  8. Type All customers in the Name box.
  9. Click OK.
  10. The editor for SQL statements is displayed. Type the following SQL statement:


  11. Click the Save button to save changes .
  12. A new identifier has been assigned to the ID box. You will use this identifier in your application code to make reference to the SQL query that you have just created.

Next: Executing a SQL query