| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: JDBC: select statements causing errros when using classes12.zip but not when using classess111.zip
Cindy,
Thank you for responding. The code I used is below. I just ran it again, and sure enough it runs great with 111.zip, but gives me:
"ORA-03120: two-task conversion routine: integer overflow"
With 12.zip
Oddly, if i pass "select some_single_col_name from node" that works in either...weird.
Any suggestions?
Thanks!
-Josh Gough
public class SampleQuery {
public static void main(String args[]) {
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin:@(description=(address=(host=
localhost)(protocol=tcp)(port=1521))(connect_data=(sid=hrd)))";
Connection con = DriverManager.getConnection(url, "blah",
"blahxxxxxx");
Statement stmt = con.createStatement();
String sql;
if (args.length > 0)
sql = args[0];
else
sql = "SELECT * from node";
String result="";
System.out.println("The query: " + sql + "\n");
// run query
ResultSet rs = stmt.executeQuery(sql);
ResultSetMetaData rsmd = rs.getMetaData();
int col_count = rsmd.getColumnCount();
System.out.println("Columns: " + String.valueOf(col_count));
while(rs.next()) {
for (int i=1; i <= col_count; i++) {
result += rs.getString(i) + " ";
}
System.out.println(result + "\n");
result = "";
}
rs.close();
stmt.close();
} catch (Exception e) {
System.out.println(e.getMessage());
}
"C. Ferguson" wrote:
> Hi Josh, > Could you post your code snippet? I've used both the classes111 and > classes12 files, with no code modifications and they work fine. I do lots > of multi column selects... > Cindy >Received on Wed Aug 04 1999 - 00:34:35 CDT
![]() |
![]() |