Ready to get started?

Download a free trial of the MYOB AccountRight Driver to get started:

 Download Now

Learn more:

MYOB AccountRight Icon MYOB AccountRight JDBC Driver

Complete read-write access to MYOB AccountRight enables developers to search (Customers, Transactions, Invoices, Sales Receipts, etc.), update items, edit customers, and more, from any Java/J2EE application.

Query MYOB AccountRight Data in DataGrip



Create a Data Source for MYOB AccountRight in DataGrip and use SQL to query live MYOB AccountRight data.

DataGrip is a database IDE that allows SQL developers to query, create, and manage databases. When paired with the CData JDBC Driver for MYOB AccountRight, DataGrip can work with live MYOB AccountRight data. This article shows how to establish a connection to MYOB AccountRight data in DataGrip and use the table editor to load MYOB AccountRight data.

Create a New Driver Definition for MYOB AccountRight

The steps below describe how to create a new Data Source in DataGrip for MYOB AccountRight.

  1. In DataGrip, click File -> New > Project and name the project
  2. In the Database Explorer, click the plus icon () and select Driver.
  3. In the Driver tab:
    • Set Name to a user-friendly name (e.g. "CData MYOB AccountRight Driver")
    • Set Driver Files to the appropriate JAR file. To add the file, click the plus (), select "Add Files," navigate to the "lib" folder in the driver's installation directory and select the JAR file (e.g. cdata.jdbc.myob.jar).
    • Set Class to cdata.jdbc.myob.MYOB.jar
    Additionally, in the advanced tab you can change driver properties and some other settings like VM Options, VM environment, VM home path, DBMS, etc
    • For most cases, change the DBMS type to "Unknown" in Expert options to avoid native SQL Server queries (Transact-SQL), which might result in an invalid function error
  4. Click "Apply" then "OK" to save the Connection

Configure a Connection to MYOB AccountRight

  1. Once the connection is saved, click the plus (), then "Data Source" then "CData MYOB AccountRight Driver" to create a new MYOB AccountRight Data Source.
  2. In the new window, configure the connection to MYOB AccountRight with a JDBC URL.

    Built-in Connection String Designer

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

    java -jar cdata.jdbc.myob.jar

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

    These properties are required when connecting to a company file (both for Cloud and On-Premise instances).

    • CompanyFileId: You can find this by starting MYOB, opening your data file, and selecting Help -> About MYOB
    • User: The username associated with your company file.
    • Password: The password associated with your company file.

    Connecting to a Cloud Instance

    To connect to a cloud instance of MYOB, you can use the embedded OAuth credentials or create an OAuth app with MYOB. This process is detailed in the Help documentation.

    Connecting to an On-Premise instance:

    When connecting to an on-premise instance, you will need to set the following connection property in addition to those above:

    • InitiateOauth: Set this to OFF.
    • Url: The Url of your MYOB instance.
  3. Set URL to the connection string, e.g., jdbc:myob:OAuthClientId=YourClientId; OAuthClientSecret=YourClientSecret; CompanyFileId=yourCompanyFileId; CallbackURL=http://localhost:33333; User=companyFileUser; Password=companyFilePassword; InitiateOAuth=GETANDREFRESH
  4. Click "Apply" and "OK" to save the connection string

At this point, you will see the data source in the Data Explorer.

Execute SQL Queries Against MYOB AccountRight

To browse through the MYOB AccountRight entities (available as tables) accessible through the JDBC Driver, expand the Data Source.

To execute queries, right click on any table and select "New" -> "Query Console."

In the Console, write the SQL query you wish to execute. For example: SELECT Id, Name FROM Accounts WHERE Type = 'Bank'

Download a free, 30-day trial of the CData JDBC Driver for MYOB AccountRight and start working with your live MYOB AccountRight data in DataGrip. Reach out to our Support Team if you have any questions.