Ready to get started?

Learn more about the CData JDBC Driver for Sage 300 or download a free trial:

Download Now

Manage Sage 300 Data in DBArtisan as a JDBC Source

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

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

Integrate Sage 300 Data into DBArtisan Projects

Follow the steps below to register Sage 300 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.

    Sage 300 requires some initial setup in order to communicate over the Sage 300 Web API.

    • Set up the security groups for the Sage 300 user. Give the Sage 300 user access to the option under Security Groups (per each module required).
    • Edit both web.config files in the /Online/Web and /Online/WebApi folders; change the key AllowWebApiAccessForAdmin to true. Restart the webAPI app-pool for the settings to take.
    • Once the user access is configured, click https://server/Sage300WebApi/ to ensure access to the web API.

    Authenticate to Sage 300 using Basic authentication.

    Connect Using Basic Authentication

    You must provide values for the following properties to successfully authenticate to Sage 300. Note that the provider reuses the session opened by Sage 300 using cookies. This means that your credentials are used only on the first request to open the session. After that, cookies returned from Sage 300 are used for authentication.

    • Url: Set this to the url of the server hosting Sage 300. Construct a URL for the Sage 300 Web API as follows: {protocol}://{host-application-path}/v{version}/{tenant}/ For example, http://localhost/Sage300WebApi/v1.0/-/.
    • User: Set this to the username of your account.
    • Password: Set this to the password of your account.

    Built-in Connection String Designer

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

    java -jar cdata.jdbc.sage300.jar

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

    Below is a typical connection string:

    jdbc:sage300:User=SAMPLE;Password=password;URL=http://127.0.0.1/Sage300WebApi/v1/-/;Company=SAMINC;
  6. Finish the wizard to connect to Sage 300 data. Sage 300 entities are displayed in the Datasource Explorer.

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