Use
ADO.NET
classes to connect, create command and operate on data.
If the
UserName
is
Unique in your Database, then you should query your Database with the following SQL query...
SELECT * FROM yourTableName WHERE UserName = @UserName
You need to pass parameter
@UserName
with Value as the
Label
Text.
Before all this, search how to work with
ADO.NE
T and how to pass parameters for a query. You will get many examples on
Google.