ilhami caliskan

ilhami caliskan

  • NA
  • 76
  • 91.7k

Sql C#

May 13 2014 6:01 PM
I have an error with following but I can't see it.
can anybody help urgently?
 
text is here a string 
 
try
{
ConnUtil connUtil = new ConnUtil();
OleDbDataReader reader = connUtil.readData("select * from Must where CompanyName = " + text);
while (reader.Read())
if text is an int then code works (CompanyName is CompanyID in that case which is an int value)
 
but as I turn all to a string, I have null value in reader

Answers (1)