N
Nick
I've created a user control that extracts data from a database.
The VB code is all contained in a code-behind file.
I'm trying to extract a value from the request.querystring but keep getting
the following error:
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: BC30369: Cannot refer to an instance member of a
class from within a shared method or shared member initializer without an
explicit instance of the class.
Source Error:
Line 40:
Line 41: dim ParaCategory as new oledbParameter
Line 42: ParaCategory.Value=request.querystring("CatID")
Line 43: ParaCategory.ParameterName="@Cat"
Line 44: ParaCategory.dbType=dbType.Int32
I'm very new to this so I've probably made a really simple mistake.
I have the following imports at in my code.
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data
Imports System.Data.OleDB
Imports System.Web
Which class is the Error referring to?
Any help would be greatly appreciated.
Thanks
Nick
The VB code is all contained in a code-behind file.
I'm trying to extract a value from the request.querystring but keep getting
the following error:
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: BC30369: Cannot refer to an instance member of a
class from within a shared method or shared member initializer without an
explicit instance of the class.
Source Error:
Line 40:
Line 41: dim ParaCategory as new oledbParameter
Line 42: ParaCategory.Value=request.querystring("CatID")
Line 43: ParaCategory.ParameterName="@Cat"
Line 44: ParaCategory.dbType=dbType.Int32
I'm very new to this so I've probably made a really simple mistake.
I have the following imports at in my code.
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data
Imports System.Data.OleDB
Imports System.Web
Which class is the Error referring to?
Any help would be greatly appreciated.
Thanks
Nick