Java : JDBC Problem

java , javascript United States
  • 16 years ago

    Hi there all,

    I had this code:


    import java.sql.;
    import java.math.

    public class Dbtest{
           public static void main(String args[])
                   try {

                           DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
                           System.out.println("Driver registered...\n");
                           String url = "jdbcracle:thinitdrnd01:1521:REL4";
                           String scall = "{ ? = call SP_GetCustBrthDtIE( ?, ?, ? )}";
                           Connection conn = DriverManager.getConnection(url, "tux", "tux");
                           System.out.println("Connection established...\n");
                           CallableStatement cs = conn.prepareCall(scall);
                           System.out.println("Stored procedure prepared...\n");

                           cs.registerOutParameter(1, Types.DATE); // BrthDt DATE OUT
                           cs.setString(2, "812"); // CustNo varchar(8) IN
                           cs.setString(3, "nor"); // TDMUserID Varchar(32) IN
                           cs.setString(4, "0");   // TDM
    Version Varchar(32) IN

                           System.out.println("Parameter prepared...\n");
                           System.out.println("Execute: " + cs.execute());
                           Date rtn = cs.getDate(1);
                           System.out.println("Got from stored procedure: " + rtn);
                   } catch (SQLException e) {
                           System.out.println("Error: " + e.getMessage());


    but eventually i got this error message


    Driver registered...

    Connection established...

    Stored procedure prepared...

    Parameter prepared...

    Error: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'SP_GETCUSTBRTHDTIE'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    can anyone show me where i make mistakes?

  • 16 years ago

    A conclusion of closing since the problem has been solved

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The trouble with programmers is that you can never tell what a programmer is doing until it's too late.” - Seymour Cray