为什么提示“parameter 'PRecordValue'not found”? PRecordValue这个参数我明明指定了呀。为什么呢?function TExportForm.IsRecordExists(ARecordName, ADB: string;
ARecordValue: variant): boolean;
begin
QueryExport.Close;
QueryExport.SQL.Clear;
QueryExport.SQL.Add('select :PRecordName from :PDB where :PRecordName=:PRecordValue');
QueryExport.ParamByName('PRecordName').Value := ARecordName;
QueryExport.ParamByName('PDB').Value := ADB;
QueryExport.ParamByName('PRecordValue').Value := ARecordValue;
QueryExport.Open;
result := not(QueryExport.IsEmpty);
QueryExport.Close;
end;
ARecordValue: variant): boolean;
begin
QueryExport.Close;
QueryExport.SQL.Clear;
QueryExport.SQL.Add('select :PRecordName from :PDB where :PRecordName=:PRecordValue');
QueryExport.ParamByName('PRecordName').Value := ARecordName;
QueryExport.ParamByName('PDB').Value := ADB;
QueryExport.ParamByName('PRecordValue').Value := ARecordValue;
QueryExport.Open;
result := not(QueryExport.IsEmpty);
QueryExport.Close;
end;
talbe 名不能用作参数的