Have been struggling to write a database into a msgbox.
This is the code:
Dim login = Me.UsersTableAdapter1.Login(User.Text, Pass.Text)
If login Is Nothing Then
MsgBox("Username or Password is incorrect!", MsgBoxStyle.Critical, "Login Error")
Else
Dim Userinformation = Me.UsersTableAdapter1.GetUserInfo(User.Text, Pass.Text)
MsgBox("Welcome " & Userinformation, MsgBoxStyle.Information, "Access Granted")
The database is a MS Access-file. The first part where I check that the user exists and that the password/username is correct works.
But I want to write Welcome "firstname of the user".
All the information should be in the Userinformation variable. But how can I get the firstname value?
This post has been edited by Nickless: 30 October 2010 - 03:31 AM

New Topic/Question
Reply




MultiQuote






|