string aa="select user_info.user_xm from dxhy_info,user_info where dxhy_info.user_id2='"+user_info.id+"' and dxhy_info.user_id1='"+1+"'"OleDbDataAdapter dtCmd = new OleDbDataAdapter(aa,mySQLConnection);
再看看你得aa是什么。

解决方案 »

  1.   

    user_info.id应该是字段名OleDbDataAdapter dtCmd = new OleDbDataAdapter("select user_info.user_xm from dxhy_info,user_info where dxhy_info.user_id2=user_info.id and dxhy_info.user_id1='"+1+"'",mySQLConnection);
      

  2.   

    '"+user_info.id+"'这是string型变量的写法,写成user_info.id
    '"+1+"'里面是1吧。写成'1'
      

  3.   

    改后还有错误!!!!
    标准表达式中数据类型不匹配。 
    说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.OleDb.OleDbException: 标准表达式中数据类型不匹配。源错误: 
    行 21: 
    行 22:            dtSet = new DataSet();
    行 23:            dtCmd.Fill(dtSet);///错误行
    行 24:            RadioButtonList1.DataSource = dtSet.Tables[0].DefaultView;
    行 25:            RadioButtonList1.DataBind();
     
      

  4.   

    从你的程序上来看'"+1+"'"中的1(是数字1吧而不是l字母)应该是指一个具体的数字而不是一个变量所以可以把它直接改成dxhy_info.user_id1=1",如果1为字符则写成='1'就可以了。
      

  5.   

    user_info.id是变量的话,就应该先定义。
    不过好像不能定义这样的变量名吧。
    是数据库里的字段名的话,更不可能这样写,这样写表示user_info.id是个变量。
      

  6.   

    user_info 是什么啊.你是自己定义的变量,还是数据表啊.