Vipin Kumar

Vipin Kumar

  • NA
  • 84
  • 44.6k

Select * from tablename where name like '%' + @name +'%' i can't get result.

Jul 12 2010 3:08 AM


hello
 i using like command

cmd =
new SqlCommand("Select * from corporationtab where industryname like '%@name%'",con) ;
SqlParameter param = new SqlParameter();
param.ParameterName =
"@name";
param.Value = a;
cmd.Parameters.Add(param);
rd = cmd.ExecuteReader();
if(rd.Read()

{
while (rd.Read())
{
}


here rd.Read() is not read data....
its not working...
this is urgent for me...
please help me.

if someone hav any result please help me.

Answers (2)