473,396 Members | 1,833 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

dynamically build call to a function

JT
what is the correct way to dynamically build a call to a function in asp? i
have the name of the function i want to call in a dictionary object, this
works to execute the function but the output_value variable does not get
set. any ideas??

functionString = d.Item("create_contract_function_name") 'set variable for
the create contract function name that was retrieved
functionString = "output_value = " & functionString & "(param1, param2)"

Execute functionString
Jul 19 '05 #1
3 1562
Would this work (I haven't tested)?

functionString = d.Item("create_contract_function_name") 'set variable for
the create contract function name that was retrieved
functionString = functionString & "(param1, param2)"

output_value=Execute(functionString)

"JT" <jt@nospam.com> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
what is the correct way to dynamically build a call to a function in asp? i
have the name of the function i want to call in a dictionary object, this
works to execute the function but the output_value variable does not get
set. any ideas??

functionString = d.Item("create_contract_function_name") 'set variable for
the create contract function name that was retrieved
functionString = "output_value = " & functionString & "(param1, param2)"

Execute functionString

Jul 19 '05 #2
JT
nevermind - sorry that does work - i made a silly mistake in my function..

"JT" <jt@nospam.com> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
what is the correct way to dynamically build a call to a function in asp? i have the name of the function i want to call in a dictionary object, this
works to execute the function but the output_value variable does not get
set. any ideas??

functionString = d.Item("create_contract_function_name") 'set variable for the create contract function name that was retrieved
functionString = "output_value = " & functionString & "(param1, param2)"

Execute functionString

Jul 19 '05 #3
JT
i tried that i got a type mismatch error - so i guess you have to execute
the whole thing in one shot..

jt

"Lance Wynn" <la********@N.O.S.P.A.M.hotmail.com> wrote in message
news:Ot**************@TK2MSFTNGP12.phx.gbl...
Would this work (I haven't tested)?

functionString = d.Item("create_contract_function_name") 'set variable for the create contract function name that was retrieved
functionString = functionString & "(param1, param2)"

output_value=Execute(functionString)

"JT" <jt@nospam.com> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
what is the correct way to dynamically build a call to a function in asp? i have the name of the function i want to call in a dictionary object, this
works to execute the function but the output_value variable does not get
set. any ideas??

functionString = d.Item("create_contract_function_name") 'set variable for the create contract function name that was retrieved
functionString = "output_value = " & functionString & "(param1, param2)"

Execute functionString

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Joel | last post by:
Hi all, Forgive me if I've expressed the subject line ill. What I'm trying to do is to call a c++ function given the following: a. A function name. This would be used to fetch a list of...
9
by: Patrick.O.Ige | last post by:
I have a code below and its a PIE & BAR CHART. The values now are all static but I want to be able to pull the values from a database. Can you guys give me some ideas to do this? Thanks ...
3
by: Simon | last post by:
Is it possible in VB to dynamically build a function call? eg Something like: strParams = strParam(0) & ", " & strParam(1) strFunc = "Logon" if not( frmMain.objMxAPI.strFunc( strParams )) ...
11
by: skumar434 | last post by:
Hi everybody, I am faceing problem while assigning the memory dynamically to a array of structures . Suppose I have a structure typedef struct hom_id{ int32_t nod_de; int32_t hom_id;
1
by: vj | last post by:
How i can populate all fileds dynamically in jsp page based on contents found in xml file? I have written jsp servlets and java class file. i transferred automatic data from jsp to servlet then to...
9
by: Allen | last post by:
The arguments of function is variable. Given function address, argument type and data, how to dynamically call the function? The following is pseudo code. int count = 0; int offset = 0; char...
11
by: onkar.n.mahajan | last post by:
Is it possible to from function call on fly in C programming language ? I am faced with an interesting problem in that I need to take function name and arguments on fly (actually from Database...
9
by: Dahak | last post by:
I'm trying to generate dynamic functions to use as separate callbacks for an AJAX API call. The API doesn't seem to allow for the inclusion of any parameters in the callback, so I can't...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.