Hello all,
I'm attempting to use JDev to connect to and search an Oracle database. I seem to have finally made the connection, but now I can't seem to get any results. The SQL query I'm using is valid, so the problem is elsewhere...
Thanks for any suggestions.
The SQL Exception error I get is "invalid arguments in call".
The code I'm using is this:
try{
Class.forName("oracle.jdbc.driver.OracleDriver"
conn = DriverManager.getConnection("jdbcracle:thinoradb"
stmt = conn.createStatement();
String sqlqry = "SELECT id,name,sequence FROM tableA";
rs = stmt.executeQuery(sqlqry);
while (rs.next())
{
String tblId = rs.getString("id"
String tblName = rs.getString("name"
String tblSeq = rs.getString("sequence"
out.print(" - - - "
out.print("ID: " +tblId);
out.print("Name: " + tblName);
out.print("Sequence: " + tblSeq);
}
rs.close();
stmt.close();
conn.close();
}
catch (SQLException se)
{
out.print("SQL Exception: " + se.getMessage());
}
%>
I'm attempting to use JDev to connect to and search an Oracle database. I seem to have finally made the connection, but now I can't seem to get any results. The SQL query I'm using is valid, so the problem is elsewhere...
Thanks for any suggestions.
The SQL Exception error I get is "invalid arguments in call".
The code I'm using is this:
try{
Class.forName("oracle.jdbc.driver.OracleDriver"
conn = DriverManager.getConnection("jdbcracle:thinoradb"
stmt = conn.createStatement();
String sqlqry = "SELECT id,name,sequence FROM tableA";
rs = stmt.executeQuery(sqlqry);
while (rs.next())
{
String tblId = rs.getString("id"
String tblName = rs.getString("name"
String tblSeq = rs.getString("sequence"
out.print(" - - - "
out.print("ID: " +tblId);
out.print("Name: " + tblName);
out.print("Sequence: " + tblSeq);
}
rs.close();
stmt.close();
conn.close();
}
catch (SQLException se)
{
out.print("SQL Exception: " + se.getMessage());
}
%>