Hi
If I retrive the data using the query
select Name from DoctorRegistrat ion3 where Country='Indone sia' or AreaOfSpecializ ation='Cardiolo gy' or Name like 'i%'
the answer is
Name
-----------
Imran
Sabri
Ghan
If I retrive the same query in .net by giving the same corresponding data as
"select Name from DoctorRegistrat ion3 where Country='" + ddlCountry.Sele ctedItem.Text.T oString() + "' or AreaOfSpecializ ation='" + ddlDisease.Sele ctedItem.Text.T oString() + "' or Name like ''" + txtName.Text + "'%'";
then it shows the following error
Incorrect syntax near 'i'.
can anybody help me how to use the LIKE operator in .net
If I retrive the data using the query
select Name from DoctorRegistrat ion3 where Country='Indone sia' or AreaOfSpecializ ation='Cardiolo gy' or Name like 'i%'
the answer is
Name
-----------
Imran
Sabri
Ghan
If I retrive the same query in .net by giving the same corresponding data as
"select Name from DoctorRegistrat ion3 where Country='" + ddlCountry.Sele ctedItem.Text.T oString() + "' or AreaOfSpecializ ation='" + ddlDisease.Sele ctedItem.Text.T oString() + "' or Name like ''" + txtName.Text + "'%'";
then it shows the following error
Incorrect syntax near 'i'.
can anybody help me how to use the LIKE operator in .net
Comment