pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedcalling function with String resolves as "Unknown" instead of varchar
3+ messages / 2 participants
[nested] [flat]
* calling function with String resolves as "Unknown" instead of varchar
@ 2004-05-03 21:56 todd runstein <todd_run@yahoo.com>
0 siblings, 1 reply; 3+ messages in thread
From: todd runstein @ 2004-05-03 21:56 UTC (permalink / raw)
To: pgsql-jdbc
I'm calling a function with the following signature:
create or replace function
usp_affectedproduct(integer, integer, varchar) RETURNS
int as ...
I'm calling the function with something similar to:
String query = "{? = call usp_affectedproducts(?, ?,
?)}";
Connection conn = null; CallableStatement s = null;
try {
conn = getConnection(datasource);
s = conn.prepareCall(query);
s.registerOutParameter(1,Types.INTEGER);
s.setInt(2,qualityid);
s.setInt(3,submitid);
s.setString(4,products[x].getName());
s.execute();
} catch (SQLException e) {
throw e;
}finally{
<clean up stuff ...>
When I run this, I get an SQLException stating:
function usp_affectedproducts(integer, integer,
"unknown") does not exist
I've also try s.setObject(4, aString, Types.VARCHAR),
also to no avail. I've tried using a
PreparedStatement instead of the CallableStatement -
again, without success.
Any ideas? I'm running 7.4.1 on RedHat 8.0 with JDK
1.4.1_01.
Thanks in advance
=====
The only "dumb question" is the one you were too afraid to ask.
________________________________________
Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
http://routeruler.sourceforge.net
________________________________________
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: calling function with String resolves as "Unknown" instead
@ 2004-05-03 22:34 Oliver Jowett <oliver@opencloud.com>
parent: todd runstein <todd_run@yahoo.com>
0 siblings, 1 reply; 3+ messages in thread
From: Oliver Jowett @ 2004-05-03 22:34 UTC (permalink / raw)
To: todd runstein <todd_run@yahoo.com>; +Cc: pgsql-jdbc
todd runstein wrote:
> create or replace function
> usp_affectedproduct(integer, integer, varchar) RETURNS
> int as ...
> String query = "{? = call usp_affectedproducts(?, ?,
> ?)}";
Spot the typo in the function name..
-O
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: calling function with String resolves as "Unknown" instead of varchar
@ 2004-05-04 00:01 todd runstein <todd_run@yahoo.com>
parent: Oliver Jowett <oliver@opencloud.com>
0 siblings, 0 replies; 3+ messages in thread
From: todd runstein @ 2004-05-04 00:01 UTC (permalink / raw)
To: Oliver Jowett <oliver@opencloud.com>; +Cc: pgsql-jdbc
Duhhhh!
Thanks for pointing out the obvious!
--- Oliver Jowett <oliver@opencloud.com> wrote:
> todd runstein wrote:
>
> > create or replace function
> > usp_affectedproduct(integer, integer, varchar)
> RETURNS
> > int as ...
>
> > String query = "{? = call usp_affectedproducts(?,
> ?,
> > ?)}";
>
> Spot the typo in the function name..
>
> -O
=====
The only "dumb question" is the one you were too afraid to ask.
________________________________________
Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
http://routeruler.sourceforge.net
________________________________________
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-05-04 00:01 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-05-03 21:56 calling function with String resolves as "Unknown" instead of varchar todd runstein <todd_run@yahoo.com>
2004-05-03 22:34 ` Re: calling function with String resolves as "Unknown" instead Oliver Jowett <oliver@opencloud.com>
2004-05-04 00:01 ` todd runstein <todd_run@yahoo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox