Hi all,
We are usig PB2022 with 22.0.0.1892 runtime.
I have problem with this code :
STRING FAZE
decimal{0} id
DECLARE GET_ID PROCEDURE FOR GET_ID @ID = :ID OUT;
faze="EXECUTE"
EXECUTE GET_ID;
if SQLCA.sqlcode=-1 then GOTO ERR
faze="FETCH"
FETCH GET_ID INTO :ID;
if SQLCA.sqlcode=-1 then GOTO ERR
CLOSE GET_ID;
return ID
err: .............
On production server SQL Server 2017 database in 2008 compatablity mode
this command EXECUTE GET_ID;
ends with error : Cannot use an OUTPUT option when passing a constant to a stored procedure.
It works ok on our dev SQL server 2016 database in 2008 compatablity mode
Connection string has set those options CommitOnDisconnect='No',DateTimeAllowed='Yes',BindSPInput=0,DisableBind=1,StaticBind=0, CursorLock='Opt',CursorScroll='Forward',OptSelectBlob=1
DBMS = "MSOLEDBSQL SQL Server"
in query profiler on our dev server I can see those statements which are related to it:
exec [Essox_E34].[sys].sp_procedure_params_100_rowset N'GET_ID',1,N'dbo',NULL
declare @p1 nvarchar(80) set @p1=N'2133861414' exec GET_ID @p1 output select @p1
regards.
so I have positive output from testing on client's side so, RPC calling works.
Stil did not find why the old way works on our setup and not on client's setup.
I will rewrite calling about 100 sp calls and who knows how many nested call in our application :-(
Still little bit confusing that the problem was not foud, but we have solution thanks to you.
I'm not super positive with transaction object with 100+ RPC functions on it, but it seems that this is the way how to slove our problems :-(
Thank you Miguel a lot with solving problem
regards!