• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

SQLException: invalid arguments in call??

Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having the following error,also i included the sample code to access my local oracle database.
i have oracle on my c:\ drive.
Thanks for the help.
java.sql.SQLException: invalid arguments in call
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:803)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:175)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:194)
at attemptConnection.main(attemptConnection.java:16)
import java.sql.*;
import java.util.*;
public class attemptConnection
public static void main(String arg[])
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
//Here how do i specify the subname to locate my database
con = DriverManager.getConnection("jdbc: oracle:thin:@ : ORCL");
//con = DriverManager.getConnection("jdbc: odbc:uae", "scott", "tiger");
stmt = con.createStatement();
String sqlStatement="SELECT * FROM customers";
rs = stmt.executeQuery(sqlStatement);
catch(ClassNotFoundException e)
System.out.println("Couldn't load database driver: " + e.getMessage());
catch(SQLException e)
//System.out.println("SQLException caught: " + e.getMessage());
if(con != null) con.close();
catch(SQLException ignored){}
[Bodie Minster - Removed the smiley's from the JDBC stuff]
[ May 17, 2002: Message edited by: Bodie Minster ]
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two things:
1) This question is probably better suited to the JDBC forum. I'll transfer it there.
2) It's tough to tell because you have to include spaces to avoid the smileys, but I don't think you want any spaces in the string you are passing to getConnection().
Hold that thought. Tiny ad:
ScroogeXHTML - a fast and small RTF to HTML5 and XHTML converter library
    Bookmark Topic Watch Topic
  • New Topic