Java JDBC

JDBC driver is provided for Java developers.

Install

Please refer to the maven central repository for other build tool chains.

maven

<dependency>
    <groupId>com.machbase</groupId>
    <artifactId>machjdbc</artifactId>
    <version>8.0.2</version>
</dependency>

gradle

implementation group: 'com.machbase', name: 'machjdbc', version: '8.0.2'

sbt

libraryDependencies += "com.machbase" % "machjdbc" % "8.0.2"

Connect

Class.forName("com.machbase.jdbc.driver");

Properties sProps = new Properties();
sProps.put("user", "sys");
sProps.put("password", "manager");

String sURL = "jdbc:machbase://localhost:5656/mhdb";
Connection conn = DriverManager.getConnection(sURL, sProps);

JDBC

Please refer to JDBC Reference Manual for more information.

Last updated on