我正在使用postgresql過程並嘗試從我的JDBC程序中調用過程。但是,儘管我交叉檢查並驗證過程名稱是正確的,但獲取運行時異常說明過程並不存在。 這是我在做什麼Postgresql過程不會從JDBC調用
CallableStatement cs = connection.prepareCall("{call proc1()}");
cs.executeUpdate();
這是我的PROC1程序
create or replace procedure proc1()
as
begin
insert into employee_info values(1,'johnny','1111',43);
-----
end
這是輸出是什麼
Connection Failed! ERROR: function proc1() does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
我不明白爲什麼它不工作eventhough PROC1()存在於數據庫中。 我應該施放什麼?
在Postgres –
沒有'創建或替換程序哦。是嗎?那麼我應該如何創建程序。其實我熟悉mysql,oracle和其他數據庫。我是新來postgres ..你可以指導我一個很好的鏈接,這解釋了postgresql程序 – Stunner
@a_horse_with_no_name否。當我在數據庫中手動執行它時,該過程正常工作。所以程序語法沒有問題。 – Stunner