5
Contributors
6
Replies
10
Views
6 Years
Discussion Span
Last Post by kinwang2009
0

What is the problem?

You don't know how to Connect to the DB? or you don't know how to retrieve?

What is the problem you are having.

1

patishere,
you are lucky since AndreRet gave you sample code without seeing your effort. As said by AndreRet we don't give full source code before seeing your hard work. I hope AndreRet's help will be helpful.

thankx

Edited by kinwang2009: n/a

Comments
Keep it up
0

How to connect username and password in a database for more secure login?

yeah.. your lucky.. hehe.. maybe you can use encryption method in your application for it if you want it secured.

0

Oops sorry for that. I know how to code simple login but I want more secure like connecting it with a database to check if username and password exist.

Okay here is my simple login code.

Private Sub Command1_Click()
Dim login As Integer
Text2.SetFocus

If Text1.Text = Text1.Tag And Text2.Text = Text2.Tag Then
intResponse = MsgBox("Username and Password Matched", vbInformation, "iWeb Browser", 3, 1)
passfrm.Hide
rules1frm.Show
passfrm.Hide

ElseIf (Text1.Text = "") And (Text2.Text = "") Then
intResponse = MsgBox("What are you trying to do?", vbCritical + vbOKOnly, "Warning!")
intResponse = MsgBox("Please Enter Correct Password!", vbCritical + vbOKOnly, "iWeb Browser")
Text1.Text = ""
Text1.SetFocus
Else
intResponse = MsgBox("Password is incorrect!", vbCritical + vbRetryCancel, "iWeb Browser")
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text1.BackColor = vbYellow
Text2.BackColor = vbYellow
End If
End Sub

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.