T
tzmanlei
Unregistered / Unconfirmed
GUEST, unregistred user!
数据库类型 access
用dbf 数据库运行正常,但改为access数据库数类,则显示日期无效
datebegin1:=datetostr(datetimepicker1.Date);
dateend1:=datetostr(datetimepicker2.Date );
syear:=copy(datebegin1,1,4);
sqlstring:='select count(支付单位) as zc,sum(住院天数)as Zt,sum(治疗总费用) as ZF,sum(保内金额) as ZBf,sum(自费金额) as ZZ,sum(实际补偿金) as Zbc'
+' from 住院补偿'+syear+' where (就诊医院=:zfdw and 补偿日期>=:datebegin and 补偿日期<=:dateend and 状态=:zangtai)';
// sqlstring:='select count(支付单位) as zc,sum(住院天数)as Zt,sum(治疗总费用) as ZF,sum(保内金额) as ZBf,sum(自费金额) as ZZ,sum(实际补偿金) as Zbc'
// +' from 住院补偿'+syear+' where (就诊医院=:zfdw and 补偿日期>=:datebegin and 补偿日期<=:dateend and 状态="正常"';
// sqlstring:='select count(支付单位) as zc,sum(住院天数)as Zt,sum(治疗总费用) as ZF,sum(保内金额) as ZBf,sum(自费金额) as ZZ,sum(实际补偿金) as Zbc'
// +' from 住院数据.dbf where 就诊医院=:zfdw and 补偿日期>=:datebegin and 补偿日期<=:dateend and 状态="正常"';
query1.SQL.Clear ;
query1.SQL.Add(sqlstring);
query1.ParamByName('zfdw').AsString :=datamodule1.yljgTable.Fields[2].AsString ;
query1.ParamByName('datebegin').asdate :=strtodate(datebegin1) ;
query1.ParamByName('dateend').Asdate :=strtodate(dateend1) ;
query1.ParamByName('zangtai').AsString :='正常';
query1.Open;
请哪位老兄指教
用dbf 数据库运行正常,但改为access数据库数类,则显示日期无效
datebegin1:=datetostr(datetimepicker1.Date);
dateend1:=datetostr(datetimepicker2.Date );
syear:=copy(datebegin1,1,4);
sqlstring:='select count(支付单位) as zc,sum(住院天数)as Zt,sum(治疗总费用) as ZF,sum(保内金额) as ZBf,sum(自费金额) as ZZ,sum(实际补偿金) as Zbc'
+' from 住院补偿'+syear+' where (就诊医院=:zfdw and 补偿日期>=:datebegin and 补偿日期<=:dateend and 状态=:zangtai)';
// sqlstring:='select count(支付单位) as zc,sum(住院天数)as Zt,sum(治疗总费用) as ZF,sum(保内金额) as ZBf,sum(自费金额) as ZZ,sum(实际补偿金) as Zbc'
// +' from 住院补偿'+syear+' where (就诊医院=:zfdw and 补偿日期>=:datebegin and 补偿日期<=:dateend and 状态="正常"';
// sqlstring:='select count(支付单位) as zc,sum(住院天数)as Zt,sum(治疗总费用) as ZF,sum(保内金额) as ZBf,sum(自费金额) as ZZ,sum(实际补偿金) as Zbc'
// +' from 住院数据.dbf where 就诊医院=:zfdw and 补偿日期>=:datebegin and 补偿日期<=:dateend and 状态="正常"';
query1.SQL.Clear ;
query1.SQL.Add(sqlstring);
query1.ParamByName('zfdw').AsString :=datamodule1.yljgTable.Fields[2].AsString ;
query1.ParamByName('datebegin').asdate :=strtodate(datebegin1) ;
query1.ParamByName('dateend').Asdate :=strtodate(dateend1) ;
query1.ParamByName('zangtai').AsString :='正常';
query1.Open;
请哪位老兄指教