W
whhzkl
Unregistered / Unconfirmed
GUEST, unregistred user!
在我的三层结构的客户端有一个DbGrid1连着dm.CDSPntBasic(Clientdataset):
dm.CDSPntBasic.CommandText := '';
dm.CDSPntBasic.CommandText:='select * from PntBasic where replace(DEPTNAME,'+'''' + ' '+'''' + ',' + ''''+''''+') = '+''''+aaa+'''';
dm.CDSPntBasic.Execute;
dm.CDSPntBasic.Open;
dm.CDSPntBasic.Active := true;
问题是:
如果Sql语句里没有where语句,就可以返回数据集, 而加上where语句(如上)后返回为空数据集。为什么?
谢谢大家!!!!!!!!!!!!!!!!!!!!!!!!!!
dm.CDSPntBasic.CommandText := '';
dm.CDSPntBasic.CommandText:='select * from PntBasic where replace(DEPTNAME,'+'''' + ' '+'''' + ',' + ''''+''''+') = '+''''+aaa+'''';
dm.CDSPntBasic.Execute;
dm.CDSPntBasic.Open;
dm.CDSPntBasic.Active := true;
问题是:
如果Sql语句里没有where语句,就可以返回数据集, 而加上where语句(如上)后返回为空数据集。为什么?
谢谢大家!!!!!!!!!!!!!!!!!!!!!!!!!!