I'm trying to connect to the progress db through jdbc.
But I get the java.lang.StringIndexOutOfBoundsException
Can anybody please help me?!?
I'm using progress v9.1 and the JdbcProgressDriver!
Very much thanks in advance!
This is my script:
public sneltest4() {
try {
Class.forName("com.progress.sql.jdbc.JdbcProgressD river");
System.out.println("Opening db connection");
connection = DriverManager.getConnection("jdbc:JdbcProgress:T:a ctime");
s = connection.createStatement();
resultSet = s.executeQuery("SELECT persnr FROM persoon");
while (resultSet.next()) {
String st1 = resultSet.getString("persnr");
System.out.println(st1);
}
}
catch (ClassNotFoundException ex) {
System.err.println("Cannot find the database driver classes.");
System.err.println(ex);
}
catch (SQLException ex) {
System.err.println("Cannot connect to this database.");
System.err.println(ex);
}
}