I am trying to select data from a SQLite database using a variable from a textbox to display it in a dataGridView. This is the line:
SQLiteCommand sql = new SQLiteCommand("SELECT * FROM Customers WHERE name like ''" + textBox1.Text, m_dbConnection);
SQLiteDataReader read = sql.ExecuteReader();
When I attempt to search using the letter 't' the following error is thrown.
System.Data.SQLite.SQLiteException: 'SQL logic error near "t": syntax error'.
'Customer' is the table, 'name' is the column.
Seems like it is getting the value from the textbox, but I am missing something.
Thanks.