Ready to get started?

Learn more about the or download a free trial:

Download Now

Manage Sage US Data in DBArtisan as a JDBC Source

Use wizards in DBArtisan to create a JDBC data source for Sage US.

The CData JDBC Driver for Sage US seamlessly integrates Sage US data into database management tools like DBArtisan by enabling you to access Sage US data as a database. This article shows how to create a JDBC source for Sage US in DBArtisan. You can then edit data visually and execute standard SQL.

Integrate Sage US Data into DBArtisan Projects

Follow the steps below to register Sage US data as a database instance in your project:

  1. In DBArtisan, click Data Source -> Register Datasource.
  2. Select Generic JDBC.
  3. Click Manage.
  4. In the resulting dialog, click New. Enter a name for the driver and click Add. In the resulting dialog, navigate to the driver JAR. The driver JAR is located in the lib subfolder of the installation directory.
  5. In the Connection URL box, enter credentials and other required connection properties in the JDBC URL.

    The Application Id and Company Name connection string options are required to connect to Sage as a data source. You can obtain an Application Id by contacting Sage directly to request access to the Sage 50 SDK.

    Sage must be installed on the machine. The Sage.Peachtree.API.dll and Sage.Peachtree.API.Resolver.dll assemblies are required. These assemblies are installed with Sage in C:\Program Files\Sage\Peachtree\API\. Additionally, the Sage SDK requires .NET Framework 4.0 and is only compatible with 32-bit applications. To use the Sage SDK in Visual Studio, set the Platform Target property to "x86" in Project -> Properties -> Build.

    You must authorize the application to access company data: To authorize your application to access Sage, restart the Sage application, open the company you want to access, and connect with your application. You will then be prompted to set access permissions for the application in the resulting dialog.

    While the compiled executable will require authorization only once, during development you may need to follow this process to reauthorize a new build. To avoid restarting the Sage application when developing with Visual Studio, click Build -> Configuration Manager and uncheck "Build" for your project.

    Built-in Connection String Designer

    For assistance in constructing the JDBC URL, use the connection string designer built into the Sage US JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.

    java -jar cdata.jdbc.sage50us.jar

    Fill in the connection properties and copy the connection string to the clipboard.

    Below is a typical connection string:

    jdbc:sage50us:ApplicationId=8dfafu4V4ODmh1fM0xx;CompanyName=Bellwether Garden Supply - Premium;
  6. Finish the wizard to connect to Sage US data. Sage US entities are displayed in the Datasource Explorer.

You can now work with Sage US data as you work with any other database. See the driver help documentation for more information on the queries supported by the Sage US API.