Message 1 of 1
Invalid Parameter when trying to set parameter.expression HRESULT: 0x80070057
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having difficulty with a seemingly simple bit of code, assigning a string to MyParam.Expression in the code below fails with INVALID PARAMETER error HRESULT: 0x80070057
AllParams is a previously loaded ParameterList
MyParam.Expression = MyString is the statement that fails.
Private Sub SaveParameter(ByVal aParamName As String, ByVal NewExpression As String)
Dim MyString As String
Dim MyParam As Parameter
For i = 1 To AllParams.Count
If AllParams.Item(i).Name = aParamName Then
MyParam = AllParams.Item(i)
MyString = NewExpression
MyParam.Expression = MyString
End If
Next
End Sub
AnyHelp would be appreciated,
Marv