Connect to TaxJar Data from PowerBuilder

Ready to get started?

Download for a free trial:

Download Now

Learn more:

TaxJar ODBC Driver

The TaxJar ODBC Driver is a powerful tool that allows you to connect with live data from TaxJar, directly from any applications that support ODBC connectivity.

Access TaxJar data like you would a database - read, write, and update TaxJar Transactions, TaxAmounts, etc. through a standard ODBC Driver interface.



This article demonstrates how to use the CData ODBC Driver for TaxJar to connect to TaxJar data and execute queries in PowerBuilder.

The CData ODBC Driver for TaxJar can be used from any platform or development technology that supports ODBC, including PowerBuilder. This article shows how to connect to TaxJar data and execute queries from the Database Painter and controls such as the DataWindow.

Connect to TaxJar 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 authenticate to the TaxJar API, you will need to first obtain the API Key from the TaxJar UI.

NOTE: the API is available only for Professional and Premium TaxJar plans.

If you already have a Professional or Premium plan you can find the API Key by logging in the TaxJar UI and navigating to Account -> TaxJar API. After obtaining the API Key, you can set it in the APIKey connection property.

Additional Notes

  • By default, the CData connector will retrieve data of the last 3 months in cases where the entity support date range filtering. You can set StartDate to specify the minimum creation date of the data retrieved.
  • If the API Key has been created for a sandbox API account please set UseSandbox to true, but not all endpoints will work as expected. For more information, refer to the TaxJar developer documentation.

Create a Profile for the ODBC Driver for TaxJar

Follow the steps below to use the Database Painter tool to create a database profile based on an ODBC DSN (data source name) for TaxJar. In the Database Painter, you can use wizards and the UI to work with TaxJar data.

  1. In PowerBuilder, click Tools -> Database Painter.
  2. In the Objects window in the Database Painter, right-click the ODBC node and click New Profile.
  3. On the Connection tab, enter a name for the profile and select the TaxJar DSN in the Data Source menu.
  4. To view and modify a table, right-click a table and then click Edit Data -> Grid.

Using TaxJar 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 TaxJar data into a DataWindow. You can add the following code to the open method:

SQLCA.DBMS = "ODBC" SQLCA.DBParm = "ConnectString='DSN=CData TaxJar Source'" CONNECT USING SQLCA; dw_orders.SetTransObject(SQLCA); dw_orders.Retrieve();