[Solved] C# SQLite getting an SQL logic error when trying to SELECT * FROM [duplicate]


Use a parameterized query SqlCommand Parameters

var sql = new SqlCommand(
    "SELECT * FROM Customers WHERE name like @Name",
    m_dbConnection
);
var param = new SqlParameter();
param.ParameterName = "@Name";
param.Value = textBox1.Text;
cmd.Parameters.Add(param);

solved C# SQLite getting an SQL logic error when trying to SELECT * FROM [duplicate]