hi there,
i am having problem with my codes. im getting this error,
'Name 'reader' is not declared'. please help.
[B]reader = con2.ExecuteReader()[/B]
[B] reader.Read [/B]
Protected Function SiteSpecificAuthenticationMethod(ByVal UserName As String, ByVal Password As String) As Boolean
Dim log_statement As String = "SELECT * FROM [user] where username='" & UserName & "' and password='" & Password & "'"
Dim con2 As System.Data.SqlClient.SqlCommand
Dim con1 As System.Data.SqlClient.SqlConnection
con1 = New System.Data.SqlClient.SqlConnection(SqlDataSource1.ConnectionString)
con1.Open()
con2 = New System.Data.SqlClient.SqlCommand(log_statement, con1)
[B]reader = con2.ExecuteReader()[/B]
If[B] reader.Read [/B]Then
Return True
Else
Return False
End If
End Function