Janaka
Janaka

Reputation: 471

Error: cannot resolve module 'ballerina/sql'

I am using JDBC Client CRUD Operations in my project with ballerina 1.0.0 alpha version. Below is the my code.

import ballerina/io;
import ballerinax/jdbc;
import ballerina/sql;


jdbc: Client testDB = new({
        url: "jdbc:mysql://localhost:3307/incidentReportingSys",
        username: "root",
        password: "",
        poolOptions: { maximumPoolSize: 5 },
        dbOptions: { useSSL: false }
});

Then I get the errors cannot resolve module 'ballerinax/jdbc' and cannot resolve module 'ballerina/sql'.

How to solve this issue?

Upvotes: 1

Views: 584

Answers (1)

Dhananjaya
Dhananjaya

Reputation: 1615

JDBC connector name is changed to java.jdbc hence you can import it as

import ballerinax/java.jdbc;

You can find a sample here Ballerina JDBC example.

Upvotes: 2

Related Questions