Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Authenticate to Database

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Quite new and I have a question, please..

I have a VB6 form/app where I want the user to log in. I have a ODBC connection to MYSql database with usernames and passwords. How do I authenticate their "username" and "password" against the database? I have 2 textboxes and submit button on the form.
 
The way I have found best is simply to take the values from the text boxes and build it into your connection string that connects to the MySQL database.

Connection string then looks something like this:-

db.Open "Driver={mysql}; Server=name;Port=3306;Option=131072;Stmt=;Database=dbname;Uid=" & txtUser.Text & ";Pwd=" & txtPW.text & ";"

Let me know how u get on.
 
Thanks, I will try it that way, bit difficult when you are more used to web and MYSql connectivity than VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top