金沙乐娱场app下载-澳门沙金在线平台app

料中心 DOWNLOAD
在组态王中使用KVADODBGrid控件进行数据库查询时,查询条件很多,而组态王的字符串变量只支持128个字符,查询条件写不下怎么?
时间:2018-08-16 浏览次数:2013

KVADODBGrid控件提供多条件查询功能,即控件方法SetSqlStringWhere(STRING bstrWhere1,STRING bstrWhere2,STRING bstrWhere3,STRING bstrWhere4,STRING bstrWhere5,STRING bstrWhere6);

下面以查询报警数据库为例:

string whe1; 

string whe2;

string whe3;

whe1="AlarmDate='"+\本站点查询日期+"' and VarName='数据1'";

whe2=" or AlarmDate='"+\本站点查询日期+"' and VarName='数据2'" ;

whe3=" or AlarmDate='"+\本站点查询日期+"' and VarName='数据3'" ;

ctrl.SetSqlStringWhere(whe1,whe2,whe3," "," "," ");//可以最多写六个条件,用不到的就用" "代替。

ctrl.FetchData();

ctrl.FetchEnd();


-->
XML 地图