postgres.stat.result exception

Поиск
Список
Период
Сортировка
От tanu b
Тема postgres.stat.result exception
Дата
Msg-id 20030805051634.49395.qmail@web20701.mail.yahoo.com
обсуждение исходный текст
Ответы Re: postgres.stat.result exception
Список pgsql-jdbc
Hi
 
I am having a problem using a stored procedure/function in postgres ver 7.2.2

My JDBC code is as follows
----------------------------------------------------------------------------------------------------------
Connection conn = null;
CallableStatement cs = null;
try{
 conn = DatabaseAccess.CreateDBConnection() ;
    
 cs = conn.prepareCall("{? = call Save_Status(?)}");
      cs.registerOutParameter(1,java.sql.Types.INTEGER);
 cs.setString(2,strStatus);
 int iStatus = cs.executeUpdate();
................
}
---------------------------------------------------------------------------------------------------------
The function is written as follows
------------------------------------------------------------------------------------------------------------------------------
CREATE FUNCTION save_status(varchar) RETURNS int4 AS '
Begin
update TA_REGISTRATION_DATA SET REG_STATUS = $1 WHERE REG_ID = 1;
return 0;
END;
'  LANGUAGE 'plpgsql';
------------------------------------------------------------------------------------------------------------------------------
The update to the postgresql database succeeds but a postgresql.stat.result exception is thrown.
What do I need to modify in my JAVA code/function to avoid this exception.
 
Thanks and Regards
Tanu


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: JDBC (fwd)
Следующее
От: Jesus Sandoval
Дата:
Сообщение: Re: server side resultset search (for performance reasons)