EStallworth
Well-known member
I have an application that uses a dataset to collect user information(login and password). I have written a loop that searches the datatable. All was working fine until I reseeded the table. This is my original loop:
Now that I have reseeded the table, all the information has been restored as it was before but now I have to use:
And this will only allow me to read the second entry within the table (there are only 2). There are 3 columns (ID, UserName, Password) and 2 rows. Can anyone see where my problem is or why it will not read all the entries in the database(SQL)?¿ Any help would be appreciated. I have ideas of work arounds but I would really like to know just why this isn't working correctly.
Thank goodness it's Friday! I don't have to deal with it anymore until the dreaded Monday! Everyone have a good weekend!
I just realized I probably posted this in the wrong place. Admins I apologize. I feel like the users I have to deal with now! AHHHHHHHHHH!
VB.NET:
For i As Integer = 0 To Me.UserDataSet.Users.Rows.Count - 1
If user = Me.UserDataSet.Users.Rows(i).Item("UserName").ToString AndAlso password = Me.UserDataSet.Users.Rows(i).Item("Password").ToString Then
authentication = True
Me.Close()
Else
MsgBox("You are not an authorized user of this program. Please step away from the PC.")
End
End If
Next
Now that I have reseeded the table, all the information has been restored as it was before but now I have to use:
VB.NET:
For i As Integer = 1 To Me.UserDataSet.Users.Rows.Count - 1
If user = Me.UserDataSet.Users.Rows(i).Item("UserName").ToString AndAlso password = Me.UserDataSet.Users.Rows(i).Item("Password").ToString Then
authentication = True
Me.Close()
Else
MsgBox("You are not an authorized user of this program. Please step away from the PC.")
End
End If
Next
And this will only allow me to read the second entry within the table (there are only 2). There are 3 columns (ID, UserName, Password) and 2 rows. Can anyone see where my problem is or why it will not read all the entries in the database(SQL)?¿ Any help would be appreciated. I have ideas of work arounds but I would really like to know just why this isn't working correctly.
Thank goodness it's Friday! I don't have to deal with it anymore until the dreaded Monday! Everyone have a good weekend!
I just realized I probably posted this in the wrong place. Admins I apologize. I feel like the users I have to deal with now! AHHHHHHHHHH!