[Pljava-dev] Sample Code ResultSetHandle interface

From: Thomas(dot)K(dot)Hill at t-online(dot)de (Thomas Hill)
To:
Subject: [Pljava-dev] Sample Code ResultSetHandle interface
Date: 2015-08-16 10:51:52
Message-ID: 55D06B48.6050506@t-online.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Am 15.08.2015 um 11:08 schrieb Thomas Hill:
> Hi,
>
> I have installed pl/Java and am struggling to understand how the code
> in the calling Java program needs to look like if I want to use the
> resultsethandle interface and just call the sample function listsupers.
> Calling listsupers from pgAdmin (select rte.listsupers() in my
> environment) works fine and returns two rows.
>
> I tried
> CallableStatement cstmt = null;
> try {
> cstmt = conn.prepareCall("{ ? = CALL
> \"rte\".\"listsupers\"() }");
> cstmt.executeUpdate();
>
> ResultSet rs = cstmt.getResultSet();
> while (rs.next()){
> rs.getString(1);
> }
>
> but this is throwning an error when the executeUpdate() is called.
>
> Can someone please help?
>
> Thanks
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at lists.pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
Note: The sample code getNames for the resultsetprovider interface works
fine. The error thrown when trying to run the above listsupers sample is
"Malformed function or procedure escape syntax at offset 2." but
listsupers dowsn't have any in out our parameters!?

In response to

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2015-08-20 01:47:56 [Pljava-dev] Sample Code ResultSetHandle interface
Previous Message Thomas Hill 2015-08-15 09:08:30 [Pljava-dev] Sample Code ResultSetHandle interface