Hi
When i am trying like this :
cmd.CommandText = "select LastName,FirstName,EmailAddress,MobilePhone from contactdetails where LastName = 'gutta' "; my code executing perfect when i am giving static data like gutta ...
BUT
I am getting no error .. .. ..
when i am trying like this ..
cmd.CommandText = "select LastName,FirstName,EmailAddress,MobilePhone from contactdetails where LastName = " + textBox1.Text ;
ERROR IS :
dr = cmd.ExecuteReader(); ------------------>
Invalid column name 'gutta'.
Regards