Hi Team,
Retrieve the data from database into datagridview using SQL query (Like %) in C# 2008. while I perform the below coding in C# it's not work. Below is my coding.
SQLconnection con=new SQLconnection();
SQLCommand cmd=new SQLCommand();
SQLDataadapter adp=new SQLDataadapter();
con=new sqlconnection(" .........connection string here ..........");
con.open();
adp=new sqldataadapter(" select customername from customers where customername LIKE % (' "+ textbox1.text+" ')",con);
ds=new dataset();
adp.fill(ds);
datagridview1.datasource=ds.datatable[0];
con.close();
It's not work. What is a wrong here? Please help me.