组态王连接 mysql数据库_组态王连接数据库

SQLConnect(DeviceID,"dsn=MineMonitoringDBSource;uid=;pwd=");floatAyear;floatAmonth;floatAday;Ayear=ADate.Year;Amonth=ADate.Month;Aday=ADate.Day;longx;longy;longRow;longSt...

SQLConnect( DeviceID, "dsn=MineMonitoringDBSource;uid=;pwd=");

float Ayear;

float Amonth;

float Aday;

Ayear=ADate.Year;

Amonth=ADate.Month;

Aday=ADate.Day;

long x;

long y;

long Row;

long StartTime;

string temp;

temp=StrFromInt(Ayear,10);

if(Amonth<10)

temp=temp+"-0"+StrFromInt(Amonth,10);

else

temp=temp+"-"+StrFromInt(Amonth,10);

if(Aday<10)

temp=temp+"-0"+StrFromInt(Aday,10);

else

temp=temp+"-"+StrFromInt(Aday,10);

\\本站点\选择日期=temp;

ReportSetCellString("一号风机",2,2,temp);//填写日期

StartTime=HTConvertTime(Ayear,Amonth,Aday,0,0,0);//将年月日转换成以秒为单位的长整型

ReportSetHistData("一号风机","\\本站点\时间",StartTime,600,"a5:a150");

ReportSetHistData("一号风机","\\本站点\风速",StartTime,600,"b5:b150");

ReportSetHistData("一号风机","\\本站点\风量",StartTime,600,"c5:c150");

ReportSetHistData("一号风机","\\本站点\负压",StartTime,600,"d5:d150");

ReportSetHistData("一号风机","\\本站点\功率",StartTime,600,"e5:e150");

请问这个函数ReportSetHistData什么意思 就这样就能把数据取出来吗

怎么没有关联到表啊

展开


版权声明:本文为weixin_35339622原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。