Index was outside the bounds of the array

Kennyqui 216 Reputation points
2022-05-14T00:18:57.15+00:00

How to fix this?
201856-image.png

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
821 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 112.1K Reputation points
    2022-05-14T05:05:43.453+00:00

    Check a fix:

    . . .
    cmd.CommandText = "SELECT 1 FROM logininfo WHERE username = ? and StrComp([password], ?, 0) = 0"
    . . .
    If rd.Read
       MessageBox.Show("Logged In Successfully")
       Users.Show
    Else
       MessageBox.Show("Invalid username or password!")
    End
    
    0 comments No comments