开发者

Unable to solve error "reference to a non-shared member requires an object reference. vb.net "

开发者 https://www.devze.com 2023-03-22 17:51 出处:网络
I have the following code Case "Formula_MDX" Dim cubeid As String = Request("intCubeId")

I have the following code

Case "Formula_MDX"
    Dim cubeid As String = Request("intCubeId")
    Dim strDimCode As String = Request("strDimCode")
    Dim strMdxFormula As String = Request("strMdxFormula")
    Dim result As String
    result =  HostAnalytics.HostAnalyzer.HostAnalyzer.setSubstituteVarMDXType(cubeid, strDimCode, strMdxFormula)

Case Else
Response.Write("Invalid call")
End Select

that vb method returns data of type string. I declared the result of the typed string. but it is showing on that vb method like

"reference to a non-shared member requires an object reference"

How to solve this? Did I make any other mistakes in thi开发者_Python百科s code?


Make an object of that type, and invoke the method on that

Dim ha As New HostAnalytics.HostAnalyzer.HostAnalyzer()  'Edit, need New
result = ha.setSubstituteVarMDXType(cubeid, strDimCode, strMdxFormula)
0

精彩评论

暂无评论...
验证码 换一张
取 消