Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42367

MySQL User + Pass

$
0
0
Well, I knew how to do this before, but I totally forgot over the months. I'm trying to connect to my database using a username and password. Here's the code for just a password:

Code:

Dim SQLQuery = "SELECT * FROM Table WHERE User = '" & TextBox1.Text & "'"
So, how can I check with a user and pass, like this:

Code:

Dim SQLQuery = "SELECT * FROM Table WHERE User = '" & TextBox1.Text & "'" And Password =  '" & TextBox2.Text & "'"
Obviously, the above doesn't work... Thanks! :D

Viewing all articles
Browse latest Browse all 42367

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>