为何无返回的数据?
//界面层代码HIS.BLL.publicsqltagBll sqltag=new publicsqltagBll();
this.textEdit_sex.Properties.DataSource = sqltag.GetList(91, "", "", "", "");
this.textEdit_sex.Properties.DisplayMember = "名称";
this.textEdit_sex.Properties.ValueMember = "性别码";
this.textEdit_sex.Properties.NullText = "";
//BLL层代码
public DataSet GetList(int strtagno, string strwhere1, string strwhere2, string strwhere3, string strwhere4)
{
return dal.GetList(strtagno, strwhere1, strwhere2, strwhere3, strwhere4);
}
//Dal代码
public DataSet GetList(int strtagno, string strwhere1, string strwhere2, string strwhere3, string strwhere4)
{
string strsql = "SELECT sql FROM wh_tag_sql WHERE tag="+strtagno.ToString();
Database db = DatabaseFactory.CreateDatabase();
object obj = db.ExecuteScalar(CommandType.Text, strsql);
StringBuilder strSql1 = new StringBuilder();
strSql1 = strSql1.Append(obj.ToString());
strSql1.Replace(":py_code", "'" + strwhere1 + "%'");
strSql1.Replace(":d_code", "'" + strwhere2 + "%'");
strSql1.Replace(":code", "'" + strwhere3 + "%'");
strSql1.Replace(":name", "'" + strwhere4 + "%'");
Database db1 = DatabaseFactory.CreateDatabase();
return db1.ExecuteDataSet(CommandType.Text, strSql1.ToString());
}
请叫高手,界面层this.textEdit_sex中为何无返回的数据? --------------------编程问答-------------------- 单步跟踪,看看strSql1语句
--------------------编程问答-------------------- 经调试,语句没有问题, --------------------编程问答-------------------- 经调试,strSql1语句没有问题。
补充:.NET技术 , C#