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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

powerbuilder mysql stored procedures

Status
Not open for further replies.

andrewthegrate

Programmer
Jul 11, 2007
3
AU
I am currently changing from sybase to mysql in a powerbuilder 10 application. I acannot find any way that works to call a stored procedure with output arguments. I don't need the vaues in the outputs but I do need to call the procs.

for this proc

create procedure testme(OUT v_xxx VARCHAR(30))
BEGIN
SET v_xxx = 'blah blah';
END;

declare quicktest procedure for testme @xxx = :s output using sqlca;

gives "can't use the output option when passing a constant to a stored procedure"


declare quicktest procedure for testme @xxx = :s using sqlca;
messagebox("",sqlca.sqlerrtext)

gives me

[MYSQL][ODBC 3.51 Driver][mysqld-5.0.41-community] OUT or INOUT argument 1 for routine dbse.testme is not a variable or NEW pseudo-variable in BEFORE trigger

Arrgs



 
I don't know if this would work for you but I never use output arguments from stored procs in Powerbuilder. I have just found them too flaky.

Change the procedure to return the output value(s) in a result set and you will be much better off.

Matt

"Nature forges everything on the anvil of time
 
Yeah, I thought of that and it's probably the way i'll go, the procedure is being called directly from pb but also from another stored proc which needs the output vars. I'll make a wrapper proc to call this one without output variables.

Just thought I would check if anybody had a solution cause I don't much like the wrapper idea.

Thank's for answering
Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top