M
mick0987b
If you have a function that accepts an optional parameter:
Function select_live_nodes(ByVal sf_node_parent As Integer, Optional
ByVal node_orderby As String = "my_default_value”)
I know you can call the function with
X = select_live_nodes(2)
Or
X = select_live_nodes(2,”another order”)
But how do I send a varialbe as the optional parameter that might or
might not contain a value?
X = select_live_nodes(2,myvariable)
Even if ‘myvarialbe’ is empty the function does not resort to its
default value, "my_default_value”
I’ve tried sending dbnull, string.empty, but I just cant get the
parameter to resort to its default value unless I completely miss it
out from the call.
Anyone help?
Function select_live_nodes(ByVal sf_node_parent As Integer, Optional
ByVal node_orderby As String = "my_default_value”)
I know you can call the function with
X = select_live_nodes(2)
Or
X = select_live_nodes(2,”another order”)
But how do I send a varialbe as the optional parameter that might or
might not contain a value?
X = select_live_nodes(2,myvariable)
Even if ‘myvarialbe’ is empty the function does not resort to its
default value, "my_default_value”
I’ve tried sending dbnull, string.empty, but I just cant get the
parameter to resort to its default value unless I completely miss it
out from the call.
Anyone help?