H
Harry Simpson
My boss is an ol' Microsoft Script Control 1.0 script guru. So when we needed to calculate fees he wanted to use the Script Control interopted to feed in a script (VBS) along with "objects" and then just run it to calc all the fees and save them into a datatable.
Of course when i run the following I get an error:
Private Sub CalculateTheQuote()
Dim results As String
Dim obj As New MSScriptControl.ScriptControlClass
obj.Language = "VBScript"
Dim objAnswer As New A
Dim tbParams As DataTable
tbParams = objAnswer.GrabParameterTable
'when the following line runs it errs out
'System.InvalidCastException - No such interface supported
obj.AddObject("Params", tbParams, False)
End Sub
Something simple works like:
results = obj.Eval("4 + 4")
But is anyone using this control interopted?? Any good resources for this? ie using this control with ASP.NET?
TIA
Harry
Of course when i run the following I get an error:
Private Sub CalculateTheQuote()
Dim results As String
Dim obj As New MSScriptControl.ScriptControlClass
obj.Language = "VBScript"
Dim objAnswer As New A
Dim tbParams As DataTable
tbParams = objAnswer.GrabParameterTable
'when the following line runs it errs out
'System.InvalidCastException - No such interface supported
obj.AddObject("Params", tbParams, False)
End Sub
Something simple works like:
results = obj.Eval("4 + 4")
But is anyone using this control interopted?? Any good resources for this? ie using this control with ASP.NET?
TIA
Harry