- Aleš Vojáček
- PowerBuilder
- Wednesday, 1 March 2023 12:50 PM UTC
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
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.