Thread: JDBC and stored procedures
Hello, I am trying to use a stored procedure via JDBC. The objective is to be able to get data from more than one table. My procedure is a simple get country name from table countries where contry code = $1 copied from Bruces book. Ultradev is giving me "Error calling GetProcedures: An unidentified error has occured" Just thought I would ask here first if I am up against a brick wall? Cheers Tony Grant -- RedHat Linux on Sony Vaio C1XD/S http://www.animaproductions.com/linux2.html Macromedia UltraDev with PostgreSQL http://www.animaproductions.com/ultra.html
Tony, The GetProcedures function in the driver does not work. You should be able to a simple select of the stored proc however Dave On July 11, 2001 09:06 am, Tony Grant wrote: > Hello, > > I am trying to use a stored procedure via JDBC. The objective is to be > able to get data from more than one table. My procedure is a simple get > country name from table countries where contry code = $1 copied from > Bruces book. > > Ultradev is giving me "Error calling GetProcedures: An unidentified > error has occured" > > Just thought I would ask here first if I am up against a brick wall? > > Cheers > > Tony Grant > > -- > RedHat Linux on Sony Vaio C1XD/S > http://www.animaproductions.com/linux2.html > Macromedia UltraDev with PostgreSQL > http://www.animaproductions.com/ultra.html > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
On 11 Jul 2001 10:20:29 -0400, Dave Cramer wrote: > The GetProcedures function in the driver does not work. OK. I bet it is on the todo list =:-D > You should be able to a simple select of the stored proc however Yes! thank you very much!!! SELECT getcountryname(director.country) did the trick where getcountryname is the function (or stored procedure) Cheers Tony -- RedHat Linux on Sony Vaio C1XD/S http://www.animaproductions.com/linux2.html Macromedia UltraDev with PostgreSQL http://www.animaproductions.com/ultra.html
The getProcedures api is on the todo list, but I don't think it returns stored procs. Dave -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Tony Grant Sent: July 11, 2001 11:16 AM To: Dave@micro-automation.net Cc: pgsql-jdbc@PostgreSQL.org; pgsql-general@PostgreSQL.org Subject: Re: [JDBC] JDBC and stored procedures On 11 Jul 2001 10:20:29 -0400, Dave Cramer wrote: > The GetProcedures function in the driver does not work. OK. I bet it is on the todo list =:-D > You should be able to a simple select of the stored proc however Yes! thank you very much!!! SELECT getcountryname(director.country) did the trick where getcountryname is the function (or stored procedure) Cheers Tony -- RedHat Linux on Sony Vaio C1XD/S http://www.animaproductions.com/linux2.html Macromedia UltraDev with PostgreSQL http://www.animaproductions.com/ultra.html ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html