Re: Calling PGSQL Stored function thru JDBC

From: Nick Selva <mavles_pgsql(at)yahoo(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Calling PGSQL Stored function thru JDBC
Date: 2004-07-30 16:10:35
Message-ID: 20040730161035.70049.qmail@web90002.mail.scd.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Actually I changed the cs.setString(2, "P") from 1st
to 2nd parameter becoz i was thinking that could hv
been the problem. but looks like i've introduced one
more bug into my program. I've changed it back and
added the equal sign to "{ ? = call get_state(?) }".

Now the program works FINE. It's really great to have
JDBC leverage stored function in pgsql!!!! Thanks alot
Kris.

Since I'm new here, I would love to get to know what
are the type of applications that have been developed
so far that are using postgresql. This is because I
want to convince my friends and customers to adopt
pgsql for their businesses rather than wasting their
money on databases like mssql, oracle, informix. PGSQL
is greater my all means.

So Kris may I know what sort of application that you
are using pgsql, jdbc for? If its too personal a
question, i apologize and you can reserve your answer.
I hope others too will share their information on the
type of software application that pgsql is being used.

Hope I'm not troubling anyone. Just a wana quench my
immense thirst for pgsql knowledge..:)

Will wait for reply.

Regards,

Selvam

--- Kris Jurka <books(at)ejurka(dot)com> wrote:

>
>
> On Thu, 29 Jul 2004, Nick Selva wrote:
>
> > [my CallableStatement doesn't work.]
>
> You have misnumbered your parameters. You want to
> do cs.setString(2, "P")
> because that matches with the second "?", and
> cs.registerOutParameter(1,
> Types.VARCHAR) because that is the out parameter.
> You also may need to
> say "{ ? = call get_state(?) }", note the equal
> sign.
>
> Kris Jurka
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map
> settings
>


__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jan de Visser 2004-07-30 16:54:35 Re: Calling PGSQL Stored function thru JDBC
Previous Message Anders Hermansen 2004-07-30 11:30:59 Re: PostgreSQL JDBC + Hibernate lose valuable debug info if an exception is thrown