Taking over some code from my predecessor and I found a query that uses the Like operator:
SELECT * FROM suppliers
WHERE supplier_name like '%'+name+%';
Trying to avoid SQL Injection problem and parameterize this but I am not quite sure how this would be accomplished. Any suggestions ?
note, I need a solution for classic ADO.NET - I don't really have the go-ahead to switch this code over to something like LINQ.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…