Dim nome As Object name = Database.ExecuteScalar("SELECT a.name FROM users a WHERE a.coduser = :pLogin and a.password = :pPassword" _ , myParamArray) Dim a As String Dim b As String Dim errlist As String Try If Not name Is Nothing Then MsgBox("Welcome " & name.ToString & "!") Else errlist End If Select Case errlist Case 1 If name = "" And passid = "" Then MsgBox("enter the name and password") End If Case 2 If name <> a Then MsgBox("the name you entered does not exist, please enter a valid name.") End If Case 3 if pass<> nome,b then MsgBox("the password is incorrect") End If Case 4 If name <> a And passid <> b Then MsgBox("the user and password are incorrect, please insert again.") End If Case 5 If DataBase = 0 Then MsgBox("DB currently unavailable") ElseIf Database = 1 Then 'works End If End Select Catch ex As Exception MessageBox.Show("Error establishing a database connection:" + ex.Message) End Try
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)