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 use stored procedures as datawindow datasource

Status
Not open for further replies.
Jan 11, 2003
4
CA
Hi all,

when i try to use a stored procedure which returns a cursor as a datawindow datasource, i got an error message which told me that the parameter of the cursor didn't declare. in fact, this cursor only has a return parameter(cursor) and not input parameter and the type of cursor has been declared in the package
so can anyone tell me why and how to fix it.

thanks

 
Is it declared as a REF Cursor? It needs to be a REF Cursor. Further, your dw can only cal dB-PROCEDUREs that wrap to a procedure/function inside a PACKAGE. Essentially, your dw calls a procedure that in turn maps to a package-procedure.
RichCTwang ,

Once you fix the above areas, you will have to open the dw, go to SQL and RE-SELECT the procedure so the arguments are auto-updated.


Regards,

---
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
Hi

thanks for your reply,but it still doesn't work out. in fact, i got the same error message. do you know any other reasons to cause this problem?



 
This is what I use.

set up procedure with input parameters (if used)

>create proc select_ship_branch
>@ac_sell_br char(2) = null,
>@ac_part_no char(6) = null

do what ever you do in the proc

at end of proc return the data

>Select
> ship_br,
> ship_qty
>From #ship_branch

in Powerbuilder to retieve the data

>ll_rowcount = dw_ship_br.retrieve(sell_br, part_no)

Columns in datawindow have the same names as those in the proc select statement which returns the data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top