Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get OUtPUT value from stored procedure. 1

Status
Not open for further replies.

kmsam2

Programmer
May 21, 2003
29
MY
I code like below, but I can't get the value. I had tested my stored procedure, it can return value, but not in PB.
Please help!
Sam.

string ls_output=''

DECLARE xp_get_user PROCEDURE FOR xp_get_user @@username=:ls_output output
using sqlca;
execute xp_get_user;

messagebox('ls_output',ls_output)


Sam.
 
A very easy way to retrieve results from a stored proc is to create a datawindow which uses it. No messy Powerscript declare or execute statements, etc - just a simple dw.retrieve().
 
Else wat u could do is

string ls_output=''

initialize the variable as
string ls_output= space(255)

this would do the needful
 
add this after the execute
FETCH xp_get_user INTO :ls_output;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top