From: | thhal at mailblocks(dot)com (Thomas Hallgren) |
---|---|
To: | |
Subject: | [Pljava-dev] Problem with jdbc driver |
Date: | 2004-09-17 11:18:52 |
Message-ID: | thhal-0nmAmAjmaUykj3wxrLc2dGojSGNQO1L@mailblocks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
Daniel,
>My first function f1(Date, Date, int4) calls a java method in the class
>'my.package.prc.ActAtv' and returns a boolean. That works fine!!
>
>My second function f2() calls a java method in the class
>'my.package.prc.CrnAtv' and returns a boolean, but in my second class I
>have the next code:
>
>Connection _cn=DriverManager.getConnection("jdbc:default:connection");
>String _sql = "SELECT actity.uid WHERE f1($1,$2,activity.uid);
>Here I get the error!!
>
>
I have several examples running where I call SQL from within a Java
function and that SQL in turn calls other Java functions. They run
without any problem. In your example I see that you use '$1' and '$2' as
parameter placeholders instead of the '?' stipulated by JDBC. Could that
be your problem? The PL/Java driver will only recognize '?' . An attempt
to use your string would give an SQLException with 'Illegal parameter
index'.
In any case, it would be very helpful to know what the error is, what
platform you're using and what versions you have on PostgreSQL, PL/Java,
and Java.
Regards,
Thomas Hallgren
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Hallgren | 2004-09-17 14:32:08 | [Pljava-dev] Problem with jdbc driver |
Previous Message | Thomas Hallgren | 2004-09-16 19:19:42 | [Pljava-dev] Problem with jdbc driver |