class screenMessage

Comersus Version: 709
Database type: Access
Frequency: Permanent issue

I need to customize screenMessage.vb in a very simple way . (ASP.NET)
I would like to include a filter out of a request.querystring.
Here is my code

Public Shared Function getMsg(ByVal pIdScreenMessage As Integer, ByVal pMem As String) As String
Dim pLang As String
pLang = Request.querysting("Lang")
Dim oDatabase As New databaseFunctions
Dim objRd As OleDbDataReader
Dim objConn As New OleDbConnection(getConnectionString())
Dim oSetting As New getSettingKey


If pLang = "Fr" Then
oDatabase.getFromDatabase2(objConn, objRd, "SELECT screenMessageFr FROM screenMessages WHERE idScreenMessage=" & pIdScreenMessage)
getMsg = ""
oDatabase.getFromDatabase2(objConn, objRd, "SELECT screenMessageNl FROM screenMessages WHERE idScreenMessage=" & pIdScreenMessage)
getMsg = ""
End If

While objRd.Read()
getMsg = objRd.GetString(0)
End While

I always get the following error message for Request
Cannot refer to an instance member of a class from within a shared method or a shared member initialize without an explicit instance of the class.
What should I do ?


Add a Comment

Your email address will not be published. Required fields are marked *