Revision 34394 trunk/extensions/extJDBC/src/com/iver/cit/gvsig/fmap/drivers/jdbc/postgis/PostGisDriver.java
PostGisDriver.java | ||
---|---|---|
283 | 283 |
|
284 | 284 |
sqlTotal = sqlAux; |
285 | 285 |
logger.info("Cadena SQL:" + sqlAux); |
286 |
st = ((ConnectionJDBC) conn).getConnection().createStatement( |
|
286 |
Statement st = ((ConnectionJDBC) conn).getConnection().createStatement(
|
|
287 | 287 |
ResultSet.TYPE_SCROLL_INSENSITIVE, |
288 | 288 |
ResultSet.CONCUR_READ_ONLY); |
289 | 289 |
// st.setFetchSize(FETCH_SIZE); |
... | ... | |
721 | 721 |
fetch_max = fetch_min + FETCH_SIZE - 1; |
722 | 722 |
// y cogemos ese cacho |
723 | 723 |
rs.close(); |
724 |
|
|
725 |
Statement st = ((ConnectionJDBC)conn).getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, |
|
726 |
ResultSet.CONCUR_READ_ONLY); |
|
727 |
|
|
724 | 728 |
myCursorId++; |
725 | 729 |
st.execute("declare " |
726 | 730 |
+ getTableName() |
... | ... | |
1253 | 1257 |
* @throws SQLException |
1254 | 1258 |
*/ |
1255 | 1259 |
public String[] getAllFieldTypeNames(IConnection conn, String table_name) throws DBException { |
1256 |
table_name = tableNameToComposedTableName(table_name); |
|
1260 |
Statement st = null; |
|
1261 |
ResultSet rs = null; |
|
1262 |
table_name = tableNameToComposedTableName(table_name); |
|
1257 | 1263 |
try { |
1258 |
Statement st = ((ConnectionJDBC)conn).getConnection().createStatement();
|
|
1259 |
ResultSet rs = st.executeQuery("SELECT * FROM " + table_name + " LIMIT 1");
|
|
1264 |
st = ((ConnectionJDBC)conn).getConnection().createStatement(); |
|
1265 |
rs = st.executeQuery("SELECT * FROM " + table_name + " LIMIT 1"); |
|
1260 | 1266 |
ResultSetMetaData rsmd = rs.getMetaData(); |
1261 | 1267 |
String[] ret = new String[rsmd.getColumnCount()]; |
1262 | 1268 |
|
Also available in: Unified diff