Colleagues,
Imagine the situation where you don't know the data type of a, say, parameter passed to your Procedure. Then you do something like
Then you need some local memvar of the same type (say, substring to find, or an index number), or... you've got the idea.
All I could think about was something like this:
Is there any way to assign Memvar's data type directly? Something like:
Yes, I understand that VariantType is just a kind of array holding integers as IDs of this or that data type. I'm just trying to convey the idea.
Regards,
Ilya
Imagine the situation where you don't know the data type of a, say, parameter passed to your Procedure. Then you do something like
Code:
Dim liVarType As Integer = VarType(tArg)
Then you need some local memvar of the same type (say, substring to find, or an index number), or... you've got the idea.
All I could think about was something like this:
Code:
Dim liVarType As Integer = VarType(tArg)
Select Case liVarType
Case VariantType.Char
Dim lvMyLocalMemvar As Char
Case VariantType.Date
Dim lvMyLocalMemvar As Date
Case VariantType.Decimal
...
End Select
Is there any way to assign Memvar's data type directly? Something like:
Code:
Dim lvMyLocalMemvar As (VariantType.(VarType(tArg)))
Yes, I understand that VariantType is just a kind of array holding integers as IDs of this or that data type. I'm just trying to convey the idea.
Regards,
Ilya