Applicable Versions: 2.01.0152 Onwards
If you require frequent access to an SQL data source, you can use the Progress DataServers to connect the SQL data source to the Progress AppServer (the data servers are licensed with DataPA business licenses. Please speak to your sales representative for more details). However, if you only require a small amount of information from an SQL data source, and do not want the overhead of installing the data servers, you can use an alternative method.
This article uses business logic functions. For more information on creating business logic functions, see "Can I create a query that runs a Progress function on the server to retrieve data?".
First of all you need to add the sql business logic procedure to the super procedure stack of your AppServer. Follow the steps in "Can I create a query that runs a Progress function on the server to retrieve data?" on how to add the sql business logic procedure to the super procedure stack.
Once you have done this, follow the steps below to create a subject based on your CSV file.
- Open the subject wizard to create an new subject.
- Enter a name and description for your subject and press Next
- Select the System you want to create your subject against, and press Next
- Select Create business logic subject, then select RunSQLQuery from the drop down list. (NB. If RunSQLQuery does not appear in the list, check you have followed the steps in "Can I create a query that runs a Progress function on the server to retrieve data?" on how to add the sql business logic procedure to the super procedure stack
- Enter appropriate values for the ipConnectionString and ipSQLString parameters. ipConnectionString should contain an SQL connection string that is valid from the AppServer, and ipSQLString should contain a valid SQL query string. (The sql business logic procedure uses an ActiveX ADO objects connect method to connect to the SQL datasource, see How Do I Use the Connection Object in ADO? for details)
- Press next to confirm these input parameters should be kept as fixed values when a user creates a query from this subject.
- Complete the subject wizard.
- Save your changes.
- Create queries using the subject.