Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Connect to Workday Data from PowerBuilder
This article demonstrates how to use the CData ODBC Driver for Workday to connect to Workday data and execute queries in PowerBuilder.
The CData ODBC Driver for Workday can be used from any platform or development technology that supports ODBC, including PowerBuilder. This article shows how to connect to Workday data and execute queries from the Database Painter and controls such as the DataWindow.
Connect to Workday as an ODBC Data Source
If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.
To connect, there are three pieces of information required: Authentication, API URL, and WSDL URL.
Authentication
To authenticate, specify your User and Password. Note that you must append your Tenant to your User separated by an '@' character. For instance, if you normally log in with 'geraldg' and your Tenant is 'mycompany_mc1', then your User should be specified as 'geraldg@mycompany_mc1'.
API URL
The API URL may be specified either directly via APIURL, or it may be constructed from the Tenant, Service, and Host. The APIURL is constructed in the following format: <Host>/ccx/service/<Tenant>/<Service>.
WSDL URL
The WSDLURL may be specified in its entirety, or may be constructed from the Service and WSDLVersion connection properties. The WSDLURL is constructed in the following format: https://community.workday.com/sites/default/files/file-hosting/productionapi/<Service>/<WSDLVersion>/<Service>.wsdl
Create a Profile for the ODBC Driver for Workday
Follow the steps below to use the Database Painter tool to create a database profile based on an ODBC DSN (data source name) for Workday. In the Database Painter, you can use wizards and the UI to work with Workday data.
- In PowerBuilder, click Tools -> Database Painter.
- In the Objects window in the Database Painter, right-click the ODBC node and click New Profile.
- On the Connection tab, enter a name for the profile and select the Workday DSN in the Data Source menu.
- To view and modify a table, right-click a table and then click Edit Data -> Grid.
Using Workday Data with PowerBuilder Controls
You can use standard PowerBuilder objects to connect to ODBC data sources and execute queries. The following example shows how to retrieve Workday data into a DataWindow. You can add the following code to the open method:
SQLCA.DBMS = "ODBC"
SQLCA.DBParm = "ConnectString='DSN=CData Workday Source'"
CONNECT USING SQLCA;
dw_workers.SetTransObject(SQLCA);
dw_workers.Retrieve();