Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Posts
    1

    Unhappy Unanswered: Calling SQL 2000 Server SP using JDBC

    Hi this is my first post

    I really needs some help

    I have been stressing with issue for last few days.

    I have a stored Procedure ramApplicationAddTest, I can run it through SQL Query Analyser without any problem.

    I can call this using JDBC and it works, here is how I make call I make to SP

    var con1 = DBDriver.getConnection ("alias:ProclaimConnect");
    var stmt = con1.prepareCall( "{call ramApplicationAddTest(?,?,?,?,?)}");
    stmt.setString(1,'BuildApp');
    stmt.setString(2,'BASwimPool');
    stmt.setString(3,'Test Test....');
    stmt.setString(4,'');
    stmt.setFloat(5,0);
    stmt.execute();
    stmt.close();
    con1.close();

    I also have another SQL 2000 Stored Procedure called
    RamApplicationAddTest1, I can run this SP also through SQL Query Analyser without any problem.

    But when I try to run this using JDBC it, gives me following Exception.

    SQLState[ERR-Unexpected]ErrorCode[0]Message[java.lang.NullPointerException
    at com.hs.form.jdbc.JDBCErrorhandler.isMssqlConnectio nErrorInTx(JDBCErrorHanlder.

    An exception 'DatabaseQueryException' has occurred at DatabaseQueryClientWinInetImpl.cpp (291).

    var con2 = DBDriver.getConnection ("alias:ProclaimConnect");
    var stmt = con2.prepareCall( "{call ramApplicationAddTest1(?,?,?)}");
    stmt.setString(1,’BuildApp’);
    stmt.setString(2,’BASwimPool’);
    stmt.setString(3,’Test’);
    stmt.execute();
    stmt.close();
    con2.close();

    I hope somebody can give me some hints to fix this.

    Amar

  2. #2
    Join Date
    Nov 2014
    Posts
    1

    same issue

    Hello,

    Did you get solution for your following issue?

    If got, could you send me the solution? Thanks

    cyl


    Quote Originally Posted by pablaas View Post
    Hi this is my first post

    I really needs some help

    I have been stressing with issue for last few days.

    I have a stored Procedure ramApplicationAddTest, I can run it through SQL Query Analyser without any problem.

    I can call this using JDBC and it works, here is how I make call I make to SP

    var con1 = DBDriver.getConnection ("alias:ProclaimConnect");
    var stmt = con1.prepareCall( "{call ramApplicationAddTest(?,?,?,?,?)}");
    stmt.setString(1,'BuildApp');
    stmt.setString(2,'BASwimPool');
    stmt.setString(3,'Test Test....');
    stmt.setString(4,'');
    stmt.setFloat(5,0);
    stmt.execute();
    stmt.close();
    con1.close();

    I also have another SQL 2000 Stored Procedure called
    RamApplicationAddTest1, I can run this SP also through SQL Query Analyser without any problem.

    But when I try to run this using JDBC it, gives me following Exception.

    SQLState[ERR-Unexpected]ErrorCode[0]Message[java.lang.NullPointerException
    at com.hs.form.jdbc.JDBCErrorhandler.isMssqlConnectio nErrorInTx(JDBCErrorHanlder.

    An exception 'DatabaseQueryException' has occurred at DatabaseQueryClientWinInetImpl.cpp (291).

    var con2 = DBDriver.getConnection ("alias:ProclaimConnect");
    var stmt = con2.prepareCall( "{call ramApplicationAddTest1(?,?,?)}");
    stmt.setString(1,’BuildApp’);
    stmt.setString(2,’BASwimPool’);
    stmt.setString(3,’Test’);
    stmt.execute();
    stmt.close();
    con2.close();

    I hope somebody can give me some hints to fix this.

    Amar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •