Dynamic stored procedure calls (OpenInsight Specific)
At 24 AUG 1998 02:09:23PM Duane Pekse Aldata wrote:
I would like to dynamically change the name of the stored procedure that is called when a button is clicked. We have several versions of any given report. They are all a stored procedure, suffixed with a number.
ie REP_STATEMENT (default)REP_STATEMENT_1 (for customer x)REP_STATEMENT_2 (for customers y & z)Right now we store the number to suffix onto the stored procedure name in a table, and then use a case statement to call the correct procedure. However, this means that every time we create another variation on the report, we need to add it to the case statement. Is there a way to append the number onto the end of the procedure name as it is being called?
ie CALL REP_STATEMENT:x where x=_1"TIA
Duane PekseAldata Software[email protected]
At 24 AUG 1998 02:19PM Carl Pates wrote:
Duane,
Try this:
SPName=REP_STATEMENT"
Begin Case
Case CustomerXSPName := "_1"Case CustomerYSPname := "_2"End Case
Call @SPName( Var1, Var2 )
Regards
Carl Pates
Sprezzatura Ltd