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 .
Loading
manu narangPosted May 29, 2006, 7:36 AM
Please help me.
li yufengPosted May 4, 2006, 4:20 AM
String sql= "SELECT [tel],[name] FROM users where name = '" + s11 + "'";