1. Douglas Oechsle
  2. PowerBuilder
  3. Friday, 12 February 2021 20:37 PM UTC

Hi, I am getting SQLDBCODE:999 Can not get parameters of procedure dbo.xxx.  

I am running pb2019 using sql server express 2019. This is a small app I just upgraded both pb and sql. On my personal (brand new) laptop, using same software, i run the app executable just fine. On a win10 desktop machine, with sql server express 2019 installed, I get a connection but then get the above error.

I am unsure the configuration item I am missing between the two environments. What should I look for?  What information do you need from me?

Douglas Oechsle Accepted Answer Pending Moderation
  1. Saturday, 13 February 2021 00:10 AM UTC
  2. PowerBuilder
  3. # 1

found it. DBParm was missing single quotes around my "variable-ized" parameters

SQLCA.DBParm = "SERVER='" + SQLCA.ServerName + "',Database='"+SQLCA.Database+"',Provider = '" + SQLCA.DBMS + "',TrustedConnection=1,BindSPInput=1,TrimSpaces=1,Identity='@@identity',DateFormat='\''yyyy-mm-dd\''',DateTimeFormat='\''yyyy-mm-dd hh:mm:ss.fff\''',TimeFormat='\''hh:mm:ss\'''host='" + as_userid + "'"

Comment
  1. Armeen Mazda @Appeon
  2. Saturday, 13 February 2021 00:30 AM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
Douglas Oechsle Accepted Answer Pending Moderation
  1. Friday, 12 February 2021 22:47 PM UTC
  2. PowerBuilder
  3. # 2

function integer USP_VALIDATE_AUTHORIZED_USER( string as_userid ) RPCFUNC ALIAS FOR "dbo.USP_VALIDATE_AUTHORIZED_USER"

 

Then the function: (first messagebox displays as expected.)

Integer li_rtn

MessageBox('usp_validate_authorized_user', 'userid = ' + as_userid )

li_rtn= SQLCA.usp_validate_authorized_user(as_userid)

If This.SQLCODE = -1 Then
MessageBox("SQL Server Error","SQLDBCODE: " + String(This.SQLDBCODE) + "~r~n" + This.SQLERRTEXT)
Return -1
Else
Return li_rtn
End If

Comment
There are no comments made yet.
Douglas Oechsle Accepted Answer Pending Moderation
  1. Friday, 12 February 2021 22:39 PM UTC
  2. PowerBuilder
  3. # 3

i'm sure I have overlooked something.  I have looked at server security logins permissions and database security Users permissions. Everything seems identical between the two devices. I did a build using the sa user id/pw.  I still get the same error.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 12 February 2021 21:04 PM UTC
  2. PowerBuilder
  3. # 4

Hi Doug;

   This could be a DB schema "permissions" issue.

Regards ... Chris

Comment
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.