Here is my code it gives me error "IsAdminuser is not member of PMS"
what should i do now to resolve this problem.

Module GlobalStuff  

Public Function IsLoggedIn(ByVal PassUserName As String, ByVal PassPassword As String) As Boolean  
Dim ReturnBool As Boolean = True        
Dim cnString As String = "Data Source=ITS;Initial Catalog=Payment;Integrated Security=True"         
Dim conn As SqlConnection = New SqlConnection(cnString)     
Dim sql = "SELECT Username,Pass,IsAdmin FROM Login WHERE Username = '" & PassUserName & "' AND Pass = '" & PassPassword & "'" 
Dim cmd As SqlCommand = New SqlCommand(sql, conn)  
Dim dr As SqlDataReader = cmd.ExecuteReader  
'ReturnBool = dr.Read()  
' since the select statement is going to return a value that   
' we want to read we will go ahead and read it in 
If dr.Read() Then  
GlobalStuff.IsAdminUser = Convert.ToBoolean(dr("IsAdmin").ToString())  
GlobalStuff.IsAdminUser = False  
ReturnBool = False  
End If     
Catch Exp As SqlException  
ReturnBool = False  
'Put other code to handle, log, etc... errors here  
Catch Exp As Exception  
ReturnBool = False  
'Put other code to handle, log, etc... errors here  
If conn IsNot Nothing AndAlso conn.State <> ConnectionState.Closed Then  
End If            
End Try  
Return ReturnBool  
End Function  
End Module

i assume you have defined IsAdminUser as a global variable in this module.
so change GlobalStuff.IsAdminUser to IsAdminUser

This article has been dead for over six months. Start a new discussion instead.