[postgis] JDBC Problem

mtondorf2002 m.tondorf at online.de
Fri Jan 4 16:06:33 PST 2002


I am trying to load PGgeometry objects from a Postgis table but I always get an exeption (java.lang.String) in line (PGgeometry pgeom = (PGgeometry)ors.getObject(1);)

try {
String query = "SELECT AsText(geometrie) as geometrie, ID_"+jTextField_tableName.getText()+" FROM "+ jTextField_tableName.getText();

Statement stm = conn.createStatement();
ResultSet ors = stm.executeQuery(query);
while (ors.next()) {
  PGgeometry pgeom = (PGgeometry)ors.getObject(1);
  int aktID = ors.getInt(2);
}
stm.close();
}
catch (Exception de) {
jTextArea_Error.setText(de.getMessage());
jLabel_Status.setText("Konnte Daten nicht auslesen.");
}

Where is my mistake?

Markus Tondorf


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Tiny Wireless Camera under $80!
Order Now! FREE VCR Commander!
Click Here - Only 1 Day Left!
http://us.click.yahoo.com/WoOlbB/7.PDAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 





More information about the postgis-users mailing list