1. Javier Garcia Martin
  2. PowerBuilder
  3. Tuesday, 22 February 2022 15:15 PM UTC

Good afternoon, I'm testing the new MSOLEDBSQL driver. I have encountered the following problem: The call to the stored procedures returns the error "cannot use output option when passing a constant to a stored procedure". The strange thing is that if I run PB with the user who owns the database tables it works correctly, but if I run with another user it returns that error.  

It is as if PB recognized the variables as constants. I have tried with local variables, granting permissions to execute stored procedures to the user and it doesn't work. can anyone give me any solution?

 

string is_value

declare Proc_1 Procedure for procedure_example @as_value1 = 'value',
@as_value2 = :is_value OUTPUT
USING SQLCA;

 

Thanks

 

Javier Garcia Martin Accepted Answer Pending Moderation
  1. Tuesday, 22 February 2022 16:43 PM UTC
  2. PowerBuilder
  3. # 1
I answer myself with the solution. Since the SPs are created with the dbo user, the SP must be called with dbo.name_sp
Comment
  1. Armeen Mazda @Appeon
  2. Tuesday, 22 February 2022 17:11 PM UTC
Thanks for sharing the solution!
  1. Helpful
  1. mike S
  2. Tuesday, 22 February 2022 17:36 PM UTC
you should verify what the default schema is that is assigned to the user login. current versions of sql server defaults the user login name as the default schema name. you can (should) change the user's default schema to dbo. that way you don't have to prefix dbo to the stored procedure name



  1. Helpful 2
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.