it is telling me rows is not declared in this coding if I change it to datarow is says that Length is not a member of System.Data.DataRows
I'm sorry, that line should state If zipcodeRows.Length > 0 Then
I set this up as a module my question is about this, on my login all they put in is a username and password how will I assign the Staffid and their Last name to it? Silly question I am sure, but I am a bit lost on it as I am suspecting if I was keeping their username in the Module I would assign it similar to
Dim username.Textbox = strUsername
Correct me if I am off on this constructor if you would please and thank you so much for all your help.
I'm sure that you have code in place to verify the username and password against the database.
You might wanna modify that slightly so that if it's a successful verification, then the return would contain information so that you can assign the public variables intStaffId and strLastname.
For example:
Private Sub VerifyLogin(Username As String, Password As String)
If Not Username.Equals("") AndAlso Not Password.Equals("") Then
Dim verifyRows() As DataRow
verifyRows = yourdataset.Tables("Staff").Select("Username = '" & Username & "' AND Password = '" & Password & "'")
If verifyRows.Length > 0 Then
intStaffId = verifyRows(0).Item("StaffId")
strLastName = verifyRows(0).Item("LastName")
End If
End If
End Sub