1
Answer

Sql C#

ilhami caliskan

ilhami caliskan

10y
726
1
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)