|
在主窗体单击按钮打开子窗体,同时将主窗体的
代码如下:
- procedure TMainForm.Button2Click(Sender: TObject);
- var
- mxpg1:Tmxpg;
- sqldataset1:Tsqldataset;
- s:string;
- begin
- mxpg1:=Tmxpg.Create(self.Context);
- s := InfoBrokerQEINFO.Info.DataSetByID('QEResultSJJ').FieldByName('PGDH').Asstring;
- sqldataset1 := TSQLDataSet(mxpg1.InfoBrokerZLNLPGTXXX.Info.DataSetByID('MXPGSJJ'));
- sqldataset1.SQL.Text := sqldataset1.SQL.Text + ' AND ZLNLPGMXB.PGXBH =' + s;
- [B]sqldataset1.SQLFilter := 'XT = 1';[/B] s
- qldataset1.SQLFiltered := true;
- try
- mxpg1.ShowModal;
- finally
- mxpg1.Free;
- end;
- end;
复制代码
运行到粗体部分报错如下:
---------------------------
X3 Studio
---------------------------
运行质量能力评估功能的时候发生异常:error occur during invoke getRecords method, 将 varchar 值 'BZ0101' 转换为数据类型为 int 的列时发生语法错误。
类型:Exception。
---------------------------
确定
---------------------------
MXPGSJJ'的sql语句为:
SELECT ZLNLPGBZB.PGBZBH, ZLNLPGBZB.XSBH1, ZLNLPGBZB.XSBH2, ZLNLPGBZB.SFGJX, ZLNLPGBZB.XSNR, ZLNLPGBZB.FZ, ZLNLPGMXB.PGDH, ZLNLPGMXB.PGXBH, ZLNLPGMXB.PGDA, ZLNLPGMXB.PGDF, ZLNLPGBZB.XT,ZLNLPGBZB.XT AS XT2
FROM ZLNLPGBZB, ZLNLPGMXB
WHERE ZLNLPGBZB.PGBZBH = ZLNLPGMXB.PGXBH
请指教! |
|