sql语句如下
select RoomNO, StdCount, Capacity from CapacityCountView where StdCount < Capacity后来我将where部分改为adodataset的filter = 'StdCount < Capacity',然后filtered设置为true.竟然出现".. wrong type ..."之类的错误提示!
请问这是为什么?
select RoomNO, StdCount, Capacity from CapacityCountView where StdCount < Capacity后来我将where部分改为adodataset的filter = 'StdCount < Capacity',然后filtered设置为true.竟然出现".. wrong type ..."之类的错误提示!
请问这是为什么?
AdoDataSet1.CommandText := 'select RoomNO, StdCount, Capacity from CapacityCountView where StdCount < Capacity';
AdoDataSet1.Open
程序能够正常执行
改为如下代码时
AdoDataSet1.CommandText := 'select RoomNO, StdCount, Capacity from CapacityCountView';
AdoDataSet1.Filtered := False;
AdoDataSet1.Filter := 'StdCount < Capacity';
AdoDataSet1.Filtered := True;
AdoDataset1.Open;
程序报错