I am very new to Advantage Database Server.
I am trying to connect to a ADS database using Java. Please give me a step by step solution how to do this.
I installed the necessary JAR file, but still can not connect.
Here is my connection code.
Connection.java
public Connection getConnection() {
Connection conn = null;
try {
Driver dr = (Driver) Class.forName(
"com.extendedsystems.jdbc.advantage.ADSDriver"
).newInstance();
System.out.println(
dr.getClass()
+ " getMajorVersion() **"
+ Integer.toString( dr.getMajorVersion() )
+ " .getMinorVersion() **"
+ Integer.toString( dr.getMinorVersion() )
);
conn = DriverManager.getConnection(
"jdbc:extendedsystems:advantage://server:6262;
catalog =C:\\Program Files (x86)\Advantage 11.10\\testDemoExample.add","adssys","adssys"
);
} catch (Exception er) {
er.printStackTrace();
}
return conn;
}
PS: Maybe this question is already been asked before, but i could not find a proper solution.