1. Chris Goedde
  2. PowerBuilder
  3. Thursday, 1 February 2024 17:46 PM UTC

I am trying to use a datawindow and insert a row with a stored procedure.

The table is very simple.  It just has an id and a name column.

The id column of the insert is an identity column.  The stored procedure returns the identity value when it completes.

What I don't know how to do is how to get the return value from the stored procedure so I can use it.  dw.Update() just gives me a value of 1.  Is there a way to do this or use an in/out parameter and get the value of it?

I have been running into issues trying to use the Declare Procedure pattern so I am looking into alternatives.

Accepted Answer
Ronnie Po Accepted Answer Pending Moderation
  1. Thursday, 1 February 2024 18:13 PM UTC
  2. PowerBuilder
  3. # Permalink

What DBMS are you using, and how is the stored procedure returning the id value?

If you plan to use the Rows > Stored Procedure Update... features of the DataWindow painter, then normally the id value would be an IN/OUT parameter to the stored procedure.

Comment
There are no comments made yet.
Chris Goedde Accepted Answer Pending Moderation
  1. Thursday, 1 February 2024 19:12 PM UTC
  2. PowerBuilder
  3. # 1

Thanks for the hint and the quick response.

 

Setting it up that way updated the column in the datawindow for me to grab the value.

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.