Re: CallableStatements
| От | Stuart Robinson |
|---|---|
| Тема | Re: CallableStatements |
| Дата | |
| Msg-id | Pine.LNX.4.30.0111261207350.22398-100000@dreamingamerica.com обсуждение исходный текст |
| Ответ на | Re: CallableStatements (Rene Pijlman <rene@lab.applinet.nl>) |
| Список | pgsql-jdbc |
There are various circumstances where you might want to call a stored procedure with an executeUpdate method. For example, let's suppose you have a view that combines a couple of tables and you want an application you're building to be able to write to it. Since views are read-only, you would create a rule that intercepts the inserts and updates and fires off a stored procedure instead. Since the application is doing an insert or an update, it will use executeUpdate, but the stored procedure will have to use select and return a result, causing the application to error out. -Stuart On Mon, 26 Nov 2001, Rene Pijlman wrote: > On Mon, 26 Nov 2001 10:40:52 -0800 (PST), you wrote: > >But if you use the executeUpdate method, you'll get an error, because it > >isn't expecting a result, no? So, how do you call a stored procedure using > >executeUpdate? > > You don't. In the current implementation you need to use a > SELECT statement. Why is that a problem? > > Regards, > René Pijlman <rene@lab.applinet.nl> > -- Stuart Robinson [stuart@zapata.org] http://www.nerdindustries.com http://www.tzeltal.org
В списке pgsql-jdbc по дате отправления: