Subject Re: [IBO] IB_Export Assertion Failure
Author Fabian Mario Kruszelnicki
Hi Jason
I found the problem with the export (IB_Export) of the query, it was a user who did not know how he did but modified a date, put 04/06/0219 and the correct was 04/06/2019. The Master Table was generated well, but that query was generated empty.
Thank you and sorry for generating you a problem, I knew it was from data but I could not find where it was
(This is Query with problem iqrCCCpa)
regards
Fabian


El jueves, 6 de junio de 2019 10:10:11 ART, Fabian Mario Kruszelnicki fabianmariok@... [IBObjects] <IBObjects@yahoogroups.com> escribió:


 

Hi Jason
Attachment code. I have been doing tests and I have discovered that it does not happen every time, I make 5 queries that I export and the error is only presented to me in the last query (I have marked with red the text in the place where the problem appears), to see that the queries filtered by date, and does not occur every day, is specifically with one day. I checked if the query data for that day is correct and the query gives me no data. I generated blank queries from other days and I did not have the problem in the export. Is there any way to identify within the code that this inconvenience may be due ???
regards

Fabian Kruszelnicki


    iqrCpa.ParamByName('ISUC').AsInteger := iSuc;
    iqrCpa.ParamByName('IPROV').AsInteger := iProv;
    iqrCpa.ParamByName('FDESDE').AsDate := jdeDesde.Date;
    iqrCpa.ParamByName('FHASTA').AsDate := jdeHasta.Date;
    iqrCpa.Open;
    iqrDCpa.ParamByName('ISUC').AsInteger := iSuc;
    iqrDCpa.ParamByName('IPROV').AsInteger := iProv;
    iqrDCpa.ParamByName('FDESDE').AsDate := jdeDesde.Date;
    iqrDCpa.ParamByName('FHASTA').AsDate := jdeHasta.Date;
    iqrDCpa.Open;
    iqrMCpa.ParamByName('ISUC').AsInteger := iSuc;
    iqrMCpa.ParamByName('IPROV').AsInteger := iProv;
    iqrMCpa.ParamByName('FDESDE').AsDate := jdeDesde.Date;
    iqrMCpa.ParamByName('FHASTA').AsDate := jdeHasta.Date;
    iqrMCpa.Open;
    iqrCCCpa.ParamByName('ISUC').AsInteger := iSuc;
    iqrCCCpa.ParamByName('IPROV').AsInteger := iProv;
    iqrCCCpa.ParamByName('FDESDE').AsDate := jdeDesde.Date;
    iqrCCCpa.ParamByName('FHASTA').AsDate := jdeHasta.Date;
    iqrCCCpa.Open;
    iqrImpuRtoCpa.ParamByName('ISUC').AsInteger := iSuc;
    iqrImpuRtoCpa.ParamByName('IPROV').AsInteger := iProv;
    iqrImpuRtoCpa.ParamByName('FDESDE').AsDate := jdeDesde.Date;
    iqrImpuRtoCpa.ParamByName('FHASTA').AsDate := jdeHasta.Date;
    iqrImpuRtoCpa.Open;
    //Genera Archivos de Transmision Compras
    if iqrSuc.Active then
      iqrSuc.Close;
    iqrSuc.Filtered := False;
    iqrSuc.Filter := 'ESCENTRAL = 1';
    iqrSuc.First;
    iqrSuc.Filtered := True;
    if iqrCpa.RecordCount > 0 then
    begin
      //Genera Cabecera Compras
      iexCpa.Filename := iqrSuc.FieldByName('PATHCOMUNICA').AsString+format('CO%.2d%.2d%.2d.DBF',[wDia,wMes,iSuc]);
      if FileExists(iexCpa.Filename) then
        if not DeleteFile(iexCpa.Filename) then
          raise Exception.Create('Se ha producido un Error al Generar Transmision Compras');
      iexCpa.Execute;
      //Genera Detalle Compras
      iexDCpa.Filename := iqrSuc.FieldByName('PATHCOMUNICA').AsString+format('CD%.2d%.2d%.2d.DBF',[wDia,wMes,iSuc]);
      if FileExists(iexDCpa.Filename) then
        if not DeleteFile(iexDCpa.Filename) then
          raise Exception.Create('Se ha producido un Error al Generar Transmision Compras');
      iexDCpa.Execute;
      //Genera Medios Pago Compras
      iexMCpa.Filename := iqrSuc.FieldByName('PATHCOMUNICA').AsString+format('CM%.2d%.2d%.2d.DBF',[wDia,wMes,iSuc]);
      if FileExists(iexMCpa.Filename) then
        if not DeleteFile(iexMCpa.Filename) then
          raise Exception.Create('Se ha producido un Error al Generar Transmision Compras');
      iexMCpa.Execute;
      //Genera Cta Cte Compras
      iexCCCpa.Filename := iqrSuc.FieldByName('PATHCOMUNICA').AsString+format('CC%.2d%.2d%.2d.DBF',[wDia,wMes,iSuc]);
      if FileExists(iexCCCpa.Filename) then
        if not DeleteFile(iexCCCpa.Filename) then
          raise Exception.Create('Se ha producido un Error al Generar Transmision Compras');
      iexCCCpa.Execute;
      //Genera Imputacion Remitos Facturables Compras
      iexImpuRtoCpa.Filename := iqrSuc.FieldByName('PATHCOMUNICA').AsString+format('CI%.2d%.2d%.2d.DBF',[wDia,wMes,iSuc]);
      if FileExists(iexImpuRtoCpa.Filename) then
        if not DeleteFile(iexImpuRtoCpa.Filename) then
          raise Exception.Create('Se ha producido un Error al Generar Transmision Compras');
      iexImpuRtoCpa.Execute;

      iqrCpa.Close;
      iqrDCpa.Close;
      iqrMCpa.Close;
      iqrCCCpa.Close;
      iqrImpuRtoCpa.Close;


El miércoles, 5 de junio de 2019 19:23:19 ART, 'Jason Wharton' supportlist@... [IBObjects] <IBObjects@yahoogroups.com> escribió:


 

Hi Fabian,

The image didn't make it through. It would help if you showed me the actual
line of code where the Assert() is located.

Thanks,
Jason Wharton
www.ibobjects.com


_____

From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Wednesday, June 05, 2019 5:56 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] IB_Export Assertion Failure

Hello
I am trying to generate an export using IB_Export of a sql query generated
with IB_Query, and it throws me the error that I attached in the image. Why
is it produced?
I use the Delphi 7, Firebird 2.5 and the components IBObjects 5.10.1 2808
regards

Fabian Kruszelnicki

[Non-text portions of this message have been removed]