Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL / ResultSet problem: "invalid arguments in call"

Status
Not open for further replies.

vjh

Technical User
Dec 14, 2002
46
CA


Hello all,

I posted this on the JDeveloper forum, but I think this forum may be more appropriate. Can anyone tell me what I'm doing wrong???

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("jdbc:eek:racle:thin:mad:oradb");
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());
}
%>
 
>> conn = DriverManager.getConnection("jdbc:eek:racle:thin:mad:oradb");

Does your Oracle server require a login/password all ours do?


-pete
I just can't seem to get back my IntelliSense
 
Now I feel like an idiot!

I had erased them in the pasted in text. But in fact that was the source of the problem. I had the wrong format for username/password.

Thanks.

 
>> Now I feel like an idiot!

welcome to the club [cheers] i'm a charter member!

-pete
I just can't seem to get back my IntelliSense
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top