Connect to external sql server using service

hi everyone,
I want to get data from external sql server 2008 using moqui service and put data in moqui entities ,
my problem is I con not connect to sql server
import groovy.sql.Sql

            // MSSQL connection details
            def mssqlServer = ''
            def mssqlDatabase = ''
            def mssqlUsername = ''
            def mssqlPassword = ''

            // Connection URL for MSSQL
            def mssqlUrl = "jdbc:sqlserver://${mssqlServer};databaseName=${mssqlDatabase}"
            def mssql = Sql.newInstance(mssqlUrl, mssqlUsername, mssqlPassword, '')

            // Retrieve data from MSSQL
            def mssqlQuery = 'SELECT * FROM ClockDmp'

            // Close the MSSQL connection

I connect to database using vpn but when the vpn is connected and I call the rest using postman , the bellow error happend
jdbc connector is not suitable for sql server …

can anybody help me solve the problem or say me the solution of get data from external database inside moqui services ?

1 Like

Hi, can you send a complete error?
It seems that the jdbc connector version you used is not suitable or its not match

1 Like

why not setup a new datasource?

1 Like