Dynamic Procedure name 
Author Message
 Dynamic Procedure name

Hello experts,

I have developing application in EVB 3.0 for Pocket PC, I have a query that
I have so many sub procedures but these procedures are not hardcoded
calling, its dependent on one variable "Procedure_name" as string, so as we
know that we can call sub procedure by this syntax

call <procedure_name>

But the procedure name is not fixed at design time, so how can I call
runtime procedure name. Remember that all procedures are defined at design
time but calling to that procedures is depending on one variable
"procedure_name"

Abdul Lateef



Sun, 23 Nov 2003 22:18:54 GMT  
 Dynamic Procedure name
Hi Abdul:

If you want to run a sub or function based on a
variable you can use the select case in eVB:

eg.

Select Case Trim(ProcedureName)
Case "DoIt"
    Call DoIt()
Case "SetPointer"
    Call SetPointer()
case else
    Call Nothing()
End Select

--

Good Luck!

Vincent Collura
(Inventor/Engineer)

http://www.CeBeans.com
Did you get your beans Today?

Quote:

>Hello experts,

>I have developing application in EVB 3.0 for Pocket PC, I have a query that
>I have so many sub procedures but these procedures are not hardcoded
>calling, its dependent on one variable "Procedure_name" as string, so as we
>know that we can call sub procedure by this syntax

>call <procedure_name>

>But the procedure name is not fixed at design time, so how can I call
>runtime procedure name. Remember that all procedures are defined at design
>time but calling to that procedures is depending on one variable
>"procedure_name"

>Abdul Lateef



Sun, 23 Nov 2003 22:39:24 GMT  
 Dynamic Procedure name
Is there any approach to avoid cases


Quote:
> Hi Abdul:

> If you want to run a sub or function based on a
> variable you can use the select case in eVB:

> eg.

> Select Case Trim(ProcedureName)
> Case "DoIt"
>     Call DoIt()
> Case "SetPointer"
>     Call SetPointer()
> case else
>     Call Nothing()
> End Select

> --

> Good Luck!

> Vincent Collura
> (Inventor/Engineer)

> http://www.CeBeans.com
> Did you get your beans Today?


> >Hello experts,

> >I have developing application in EVB 3.0 for Pocket PC, I have a query
that
> >I have so many sub procedures but these procedures are not hardcoded
> >calling, its dependent on one variable "Procedure_name" as string, so as
we
> >know that we can call sub procedure by this syntax

> >call <procedure_name>

> >But the procedure name is not fixed at design time, so how can I call
> >runtime procedure name. Remember that all procedures are defined at
design
> >time but calling to that procedures is depending on one variable
> >"procedure_name"

> >Abdul Lateef



Sun, 23 Nov 2003 23:11:35 GMT  
 Dynamic Procedure name
Hi Abdul:

You must have a large number of functions.

If you created the functions then you could make
a single one and have a parameter for
it that selects the code for it right in the function.

This is one way around this, I have never been
able to call a function as a variable even with
the older basic eg. QB

Vincent Collura
(Inventor/Engineer)

http://www.CeBeans.com
Did you get your beans Today?

Quote:

>Is there any approach to avoid cases



>> Hi Abdul:

>> If you want to run a sub or function based on a
>> variable you can use the select case in eVB:

>> eg.

>> Select Case Trim(ProcedureName)
>> Case "DoIt"
>>     Call DoIt()
>> Case "SetPointer"
>>     Call SetPointer()
>> case else
>>     Call Nothing()
>> End Select

>> --

>> Good Luck!

>> Vincent Collura
>> (Inventor/Engineer)

>> http://www.CeBeans.com
>> Did you get your beans Today?


>> >Hello experts,

>> >I have developing application in EVB 3.0 for Pocket PC, I have a query
>that
>> >I have so many sub procedures but these procedures are not hardcoded
>> >calling, its dependent on one variable "Procedure_name" as string, so as
>we
>> >know that we can call sub procedure by this syntax

>> >call <procedure_name>

>> >But the procedure name is not fixed at design time, so how can I call
>> >runtime procedure name. Remember that all procedures are defined at
>design
>> >time but calling to that procedures is depending on one variable
>> >"procedure_name"

>> >Abdul Lateef



Sun, 23 Nov 2003 23:26:02 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. transfer procedure names to other procedure

2. transfer procedure names to other procedure

3. transfer procedure names to other procedure

4. How to pass Database name and Stored Procedure Name at run time in subreports

5. Associating Event procedure to Dynamic Controls

6. Converting dynamic query by example SQL to RDO based SQL Stored Procedure

7. SQL query: from SELECT statement to stored procedure with dynamic PL/SQL

8. Returning keyset/dynamic recordsets when executing parameterized queries against Stored Procedures

9. Passing data in a Dynamic Array to a Stored Procedure

10. Get Dynamic SQL results from stored procedure

11. Returning keyset/dynamic recordsets when executing parameterized queries against Stored Procedures

12. Returning keyset/dynamic recordsets when executing parameterized queries against Stored Procedures

 

 
Powered by phpBB® Forum Software