Re: Java, Sybase and CallableStatement



edouard.briere@xxxxxxxxx wrote:
Hi everybody,

I've got a problem in calling a stored procedure with a
CallableStatement in JAVA.

So I've got a stocked procedure on a Sybase database. Here is the code:

[...]

Here are some lines of my Java method to call the stocked procedure:

String query = "{call ps_part_composite_firme [(?, ?)]}";

I think you have to remove the square brackets. See
http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/statement.html#999472

(Square brackets on that page serve to indicate () is optional.)

Kind regards

robert
.



Relevant Pages

  • Java, Sybase and CallableStatement
    ... CallableStatement in JAVA. ... So I've got a stocked procedure on a Sybase database. ... WHERE COD_FIRM = @CodFirme ...
    (comp.lang.java.databases)
  • Re: Why use Java Stored Procedures....
    ... Aside from Microsoft databases, most well-known databases support java ... but that is not a Stored Procedure) I ...
    (comp.databases.oracle.server)
  • TDS_RET_STATUS exception
    ... high enough the occasional deadlock can occur. ... This is ok as the java code that executed the deadlocked CallableStatement ... However, what I'm currently getting is that the first retry attempt fails, ... found for the stored procedure output parameters. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Linked Server -> Distributed query
    ... LINKED1 refers to a system DSN on the server that is link to a Sybase ... I can run this stored procedure and use it in my code to my hearts' content, ... username and password for the Sybase database. ...
    (microsoft.public.sqlserver.programming)
  • Re: Where do business rules belong... OCP and SPs
    ... problem with using a stored procedure is. ... that proc only through that interface. ... Say, in Java: ...
    (comp.object)