Public Class Data Public oDataAdapter As OleDbDataAdapter Public Shared oDataSet As DataSet Public Shared oDataView As DataView Public Shared cSQL As String Public Shared cConnectionString As String Public Shared oConnection As OleDbConnection Public Shared nCount As Integer ' SQL exec ' expC1 SQL command ' expO1 Connection Public Shared Function SQLExec(ByVal tcSQL As String, ByVal toConnection As OleDbConnection) As Boolean Dim llSuccess As Boolean llSuccess = False cSQL = tcSQL cConnectionString = toConnection.ConnectionString Try oDataAdapter = New OleDbDataAdapter(tcSQL, toConnection)So, basically, in this example, I have removed Shared from the Public line of oDataAdapter. So, in the SQLExec() method, I can no longer have access to oDataAdapter as it generates an error at design time.