hi there
i have problem with datagrid when itry to but acondition for the sql it appears awrong for me the code i use it is good whatever dont but condition for it
this is the code used it to have my data viewd on a data grid
public void sql()
{
String s11=TextBox1.Text.Trim();
OleDbCommand cmd;
DataSet ds=new DataSet();
OleDbDataAdapter da;
String sql= "SELECT [tel],[name] FROM users ";//where name=s11";
cmd=new
OleDbCommand(sql,connect);
da=new OleDbDataAdapter(sql,connect);
da.Fill(ds,"users");
DataGrid1.DataSource=ds;
DataGrid1.DataBind();
}
then wen itry to but where condition the problem appears .
Problem in data grid
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

li yufeng6 reputationPosted May 4, 2006, 12:20 AM EDT
String sql= "SELECT [tel],[name] FROM users where name = '" + s11 + "'";
manu narang3 reputationPosted May 29, 2006, 3:36 AM EDT
Please help me.