Here is a line of code in SQL I am attempting to use in VB6.
Dim Sqlstring As String
Sqlstring = "Update TroubleTickets set ResolvedDate = ' " + DateValue(Now) + "' where Title ='" + Trim(TicketComboBox.Text) + "'"
I am getting an error that says types do not match when i run the debugger.
any suggestions?
The concat-operator in VB is the ampersand
&.You get a type mismatch error because VB expects a number if you use
+.You should also consider using prepared statements to insert parameters into SQL queries.