I keep getting told that there are errors in my mysql syntax when I’m using parameters.
Here’s my code:
Dim db As New Database
Dim sql As String = "select firstname, password from users where email = :email"
Dim args As New List(Of MySqlParameter)
args.Add(New MySqlParameter(":email", txtEmail.Text))
' execDB(procedurename As String, proceduretype As String, parameters() as MySqlParameter, returntype As String, newconnection As Boolean)
Dim dr As MySqlDataReader = db.execDB(sql, "Text", args.ToArray, "DataReader", False)
The error states that :email is not a valid value. I don’t understand why it’s not using the parameter as I’m passing it to the execDB function.
Thanks in advance for your help.
Use
?paramsyntax,