At least I do get the
information printed out when I tried your class separately. As you
say, there might be a bug in one of the other classes, but I am going
to try it out also. THe only problem I had was that I have a remote
server, and it could not find it. My final code was therefore:
import java.sql.*;
public class TestDB {
public static void main(String[] args) {
try {
Connection conn = null;
Class driverClass = Class.forName
("sun.jdbc.odbc.JdbcOdbcDriver");
String URL = "jdbc:odbc:driver={SQL Server};
server=SERVERNAME;uid=USERID;pwd=PASSWORD;database=DBNAME";
conn =DriverManager.getConnection(URL);
CallableStatement stmt = conn.prepareCall("{call
spSelectTexts}");
ResultSet rs = stmt.executeQuery();
for (int j =0; rs.next() && j < 10;j ++ ) {
for(int i= 1; i < 4; i++) {
System.out.print(rs.getObject(i) + " ");
}
System.out.println("");
}
rs.close();
stmt.close();
conn.close();
} catch(Exception ex) {
ex.printStackTrace();
}
}
}