DF-20.1 Stored Procedure Call
DF-20.1 64-bit Postgres v12.x Windoze 10 ODBC driver
I've created very simple tests of calling both a stored procedure and function using the code in the CallSp_Help procedure in the StoredProcedureODBC specialized code example. In Postgres I have a schema specifically for procedures and functions and I've specified the schema as described in the help.
The test procedure is as simple as it gets and when called from within Postgres executes successfully, even with the body being blank.
Code:
Replace procedure testProc()
language plpgsql
as $$
declare
-- variable declaration
begin
-- stored procedure body
end; $$
Code:
Send SQLSetProcedurename of hStmt "testproc" "rms4func"
The problem in both cases that I've tried, procedure and function, I get the following error
C:\VDF-20.1\Projects\National-PROD\Programs\TestODBCSQLFunction64.exe
General error. 42P01 (1)--ERROR: relation "rms4func.testproc" does not exist;
Error while preparing parameters testproc Connection handle = 31, Statement handle = 32
Error: 12289
Error Source = ODBC_DRV.ESQL.SQLCall
MSG_SQLCALL (5233) - oObject (32) - at address 12042
MSG_CALLTHESP (5350) - DESKTOP (2) - at address 13594
MSG_DOCALLFUNCTION (5424) - DESKTOP (2) - at address 14146
[start] - at address 14148
The procedure in this case certainly does exist. Postgres is well known for throwing that error when it can't match the parameters being sent to the procedure but in this case there aren't any.
Am I doing something wrong?
Last edited by Bob Worsley; 4-Dec-2021 at 10:04 PM.
Bob Worsley
203-249-2633
rlworsley at gmail.com
Do or do not. There is no try. — Yoda