Pegasystems Pega Robot Studio
The blog shows how to use Easysoft's SQL Server ODBC driver to work with SQL Server data from Pega Robot Studio on Windows.
Installing the SQL Server ODBC driver
- Download the SQL Server ODBC driver for your Windows platform.
- Install and license the SQL Server ODBC driver on the machine where Pega Robot Studio is installed.
The install program starts the Easysoft License Manager, because you cannot use your Easysoft product until a license is obtained.
The following types of license are available:
- Free time-limited trial license, which gives you free and unrestricted use of the product for a limited period (usually 14 days).
- Full license if you have purchased the product. On purchasing the product, you are given an authorization code, which you use to obtain a license.
- In Easysoft License Manager, enter your details.
Complete the Name, E-Mail Address, and Company fields.
The E-Mail Address must be the same as the address used to register and download from the Easysoft web site or you will be unable to obtain trial licenses.
- Choose Request License.
You're asked for a license type.
- Do one of the following:
- For a trial license, choose Time Limited Trial and then choose Next.
The License Manager asks what software you are licensing. Select your product from the drop-down list and then choose Next.
- If you have obtained an authorization code for a purchased license, select Non-expiring License and then choose Next.
The License Manager requests your authorization code.
Enter the authorization code and then choose Next.
- For a trial license, choose Time Limited Trial and then choose Next.
- The License Manager displays a summary of the information you entered and allows you to choose the method of applying for your license.
- Do one of the following:
- Choose On-line Request if your machine is connected to the internet and can make outgoing connections to port 8884.
The License Manager then sends a request to the Easysoft license server to activate your license key automatically. This is the quickest method and results in your details being entered immediately into our support database.
- The remaining three options (Email Request, Print Request, and View Request) are all ways to obtain a license if your machine is off-line (does not have a connection to the internet).
Each of these methods involves providing Easysoft with information including your machine number (a number unique to your machine) and then waiting to receive your license key.
Instead of emailing your details to Easysoft, you can enter them directly at the Easysoft web site and your license key will be emailed to you automatically.
To use this method, choose View Request, and then visit:
In the licensing page, enter your machine number (and authorization code for a purchased license), choose Submit and your license key will be emailed to you.
When you receive the license key, you can activate it either by double-clicking the email attachment or by choosing Enter License on the License Manager main screen and pasting the license key into the dialog box.
- Choose On-line Request if your machine is connected to the internet and can make outgoing connections to port 8884.
- Choose Finish to exit the License Manager.
The installation is complete.
Configuring an ODBC data source
Before you can use the SQL Server ODBC driver to connect Pega Robot Studio to SQL Server, you need to configure an ODBC data source. An ODBC data source stores the connection details for the target database (in this case, SQL Server) and the ODBC driver that is required to connect to it (in this case, the SQL Server ODBC driver).
You configure ODBC data sources in ODBC Data Source Administrator, which is included with Windows. How you run ODBC Data Source Administrator depends on whether your version of Pega Robot Studio is 32-bit or 64-bit.
If your version of Pega Robot Studio is 64-bit, you need to use the 64-bit version of ODBC Data Source Administrator. In the Windows Run dialog box, enter:
odbcad32.exe
If your version of Pega Robot Studio is 32-bit, you need to use the 32-bit version of ODBC Data Source Administrator. In the Windows Run dialog box, enter:
%windir%\syswow64\odbcad32.exe
In ODBC Data Source Administrator:
- Choose the System DSN tab.
- Choose the Add button.
- Choose Easysoft ODBC-SQL Server Driver from the list of drivers, and then choose OK.
- Complete these fields in the Easysoft ODBC-SQL Server Driver DSN Setup dialog box:
Field Value DSN MSSQL
Database The database that contains the data you want to work with in Pega Robot Studio. Server myserver\myinstance
- Choose the Authentication tab.
- If you want to connect to SQL Server by using you Windows user name, choose With Integrated Windows authentication. Otherwise, choose With SQL Server authentication using a login ID and password, and enter your SQL Server login details in the spaces provided. For example, "sa" and "mypassword".
Retrieving your data in Pega Robot Studio
- In Pega Robot Studio, create a Windows form with a button, text box, and data grid.
- Locate the TableView component in the Component tray. Add the component to the Windows form.
- Add an automation.
- Locate the ODBCQuery component in the Global tab of the Component tray.
- Use the ConnectionString property of the ODBCQuery component to display the Data Link Properties dialog box.
- In the Provider tab, choose Microsoft OLE DB Provider for ODBC Drivers.
- In the Connection tab, choose Use data source name.
- Choose your Easysoft data source from the list.
- Use the Test Connection button to check the ODBC connection. If the connection test succeeds, choose the OK button to return to Pega Robot Studio.
- Choose Text as the CommandType.
- Use the Browse facility to open the SQL Command Text window.
- Ensure that the ReturnType property is set to ReturnsRows.
- Ensure that you can successfully retrieve data by using the Test Query link.