Subject | Re: [ib-support] Help please. |
---|---|
Author | Stephen J. Thompson |
Post date | 2001-02-08T22:14:40Z |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello all again,
Well I am following up my own post. First thanks to Mario for pointing out
that there should be a SUSPEND; in the SQL to allow a return value. The secon
is that InterClient does not seem to support the CallableStatement correctly.
Third, it also does not seem to support the escaped call statement.
To make the java code work I changed the CallableStatement to:
PreparedStatement stmt = dbConnection.prepareStatement("EXECUTE PROCEDURE
insert_person ?, ?, ?, ?, ?");
Can anyone confirm these findings?
1. The escaped statement '{call insert_person(?,?,?,?,?)}' is not supported
by InterClient.
2. CallableStatements are also not supported by InterClient.
Regards,
Stephen.
Hash: SHA1
Hello all again,
Well I am following up my own post. First thanks to Mario for pointing out
that there should be a SUSPEND; in the SQL to allow a return value. The secon
is that InterClient does not seem to support the CallableStatement correctly.
Third, it also does not seem to support the escaped call statement.
To make the java code work I changed the CallableStatement to:
PreparedStatement stmt = dbConnection.prepareStatement("EXECUTE PROCEDURE
insert_person ?, ?, ?, ?, ?");
Can anyone confirm these findings?
1. The escaped statement '{call insert_person(?,?,?,?,?)}' is not supported
by InterClient.
2. CallableStatements are also not supported by InterClient.
Regards,
Stephen.
On Thursday 08 February 2001 6:46 pm, Stephen J. Thompson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello all,
>
> Can anyone point me in the right direction. I am using this through
> interclient and ic responds with InvalidOperationException. What have I
> missed.
>
> Thanks in advance.
>
> java:
>
> CallableStatement stmt = dbConnection.prepareCall("{call
> insert_person(?,?,?,?,?)}");
> stmt.setString(1, "jj");
> ...
>
> ResultSet rs = stmt.executeQuery();
> rs.next();
> this.uid = rs.getInt(1);
>
>
> SQL:
>
> SET TERM ^ ;
>
> CREATE GENERATOR gen_person ^
>
> CREATE PROCEDURE "insert_person" (title VARCHAR(15))
> RETURNS (UID INTEGER)
> AS
> BEGIN
> UID = GEN_ID(gen_person, 1);
> INSERT INTO tbl_person(UID, TITLE) VALUES (:UID, :TABLE);
> END ^
>
> SET TERM ; ^
>
>
> Regards,
>
>
> Stephen.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE6gumnPmm0AnNwb5MRAhEDAJ0aCW36G+wppKXQuaoSm51iLyfQQgCeKgNz
> V2X2XY4osCYhR3VPitL/2oo=
> =ejGJ
> -----END PGP SIGNATURE-----
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE6gxpQPmm0AnNwb5MRArRMAJ918zJovEiHU25uRP32tCxr7ienYACfei9H
UnRRt1mOcLcXEwFMVVl2MOw=
=44c6
-----END PGP SIGNATURE-----