No File is Being Created when Using TIBOutputRawFile in Delphi XE6

I have the following procedure:

procedure TForm1.Button1Click(Sender: TObject);
var
   RawOutput: TIBOutputRawFile;
   FileName: string;
begin
      RawOutput:= TIBOutputRawFile.Create;
     try
        with IBSQL1 do begin
             close;
             sql.text:= 'select * from employee';
             RawOutput.FileName :=  'TRANS.ibx';
             BatchOutput(RawOutput);
        end;
     finally
        RawOutput.Free
     end;
end;

In Delphi XE6, even though this procedure is run without any exceptions, no file is being created. It created the file just fine with Delphi XE5 and before.

Has anything changed? Am I missing something?
0
Mike
6/25/2014 2:52:16 PM
embarcadero.delphi.interbase 331 articles. 1 followers. Follow

7 Replies
1291 Views

Similar Articles

[PageSpeed] 31
Get it on Google Play
Get it on Apple App Store

Mike Norayr Monjian wrote:
> I have the following procedure:
> 
> procedure TForm1.Button1Click(Sender: TObject);
> var
>    RawOutput: TIBOutputRawFile;
>    FileName: string;
> begin
>       RawOutput:= TIBOutputRawFile.Create;
>      try
>         with IBSQL1 do begin
>              close;
>              sql.text:= 'select * from employee';
>              RawOutput.FileName :=  'TRANS.ibx';
>              BatchOutput(RawOutput);
>         end;
>      finally
>         RawOutput.Free
>      end;
> end;
> 
> In Delphi XE6, even though this procedure is run without any exceptions, no file is being created. It created the file just fine with Delphi XE5 and before.
> 
> Has anything changed? Am I missing something?

There was a lot of rework on the delimited file side of things, I do not recall 
working on the raw side, but they have a common ancestor and I might have broken 
something there.  I will look at it later today time permitting.

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)
0
Jeff
6/25/2014 4:35:46 PM
Mike Norayr Monjian wrote:
> I have the following procedure:
> 
> procedure TForm1.Button1Click(Sender: TObject);
> var
>    RawOutput: TIBOutputRawFile;
>    FileName: string;
> begin
>       RawOutput:= TIBOutputRawFile.Create;
>      try
>         with IBSQL1 do begin
>              close;
>              sql.text:= 'select * from employee';
>              RawOutput.FileName :=  'TRANS.ibx';
>              BatchOutput(RawOutput);
>         end;
>      finally
>         RawOutput.Free
>      end;
> end;
> 
> In Delphi XE6, even though this procedure is run without any exceptions, no file is being created. It created the file just fine with Delphi XE5 and before.
> 
> Has anything changed? Am I missing something?

Yes in finally fixing outputting Unicode character in the delimited file version 
I messed up RAW file slightly.

In both TIBOutputRawFile and TIBInputRawFile add a public procedure

{code}
     procedure ReadyFile; override;
{code}

Then the two new procedures look like

{code}
procedure TIBOutputRawFile.ReadyFile;
begin
   inherited;
   FFile := TFileStream.Create(FFilename, fmCreate or fmShareDenyWrite);
end;

....

procedure TIBInputRawFile.ReadyFile;
begin
   inherited;
   FFile := TFileStream.Create(FFilename, fmOpenRead or fmShareDenyWrite);
end;

{code}

This will have to be delayed till XE7 to actually get into an official update 
since it requires breaking the interface.

Sorry about that, the Unicode part needed a pretty big rewrite on the Delimited 
side of the inheritance tree.

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)
0
Jeff
6/25/2014 7:34:11 PM
Jeff Overcash (TeamB) wrote:
> Yes in finally fixing outputting Unicode character in the delimited file version
> I messed up RAW file slightly. …

Can you write this up for Quality Central?
0
quinn
6/25/2014 9:22:56 PM
> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
> Mike Norayr Monjian wrote:
> > I have the following procedure:
> > 
> > procedure TForm1.Button1Click(Sender: TObject);
> > var
> >    RawOutput: TIBOutputRawFile;
> >    FileName: string;
> > begin
> >       RawOutput:= TIBOutputRawFile.Create;
> >      try
> >         with IBSQL1 do begin
> >              close;
> >              sql.text:= 'select * from employee';
> >              RawOutput.FileName :=  'TRANS.ibx';
> >              BatchOutput(RawOutput);
> >         end;
> >      finally
> >         RawOutput.Free
> >      end;
> > end;
> > 
> > In Delphi XE6, even though this procedure is run without any exceptions, no file is being created. It created the file just fine with Delphi XE5 and before.
> > 
> > Has anything changed? Am I missing something?
> 
> Yes in finally fixing outputting Unicode character in the delimited file version 
> I messed up RAW file slightly.
> 
> In both TIBOutputRawFile and TIBInputRawFile add a public procedure
> 
> {code}
>      procedure ReadyFile; override;
> {code}
> 
> Then the two new procedures look like
> 
> {code}
> procedure TIBOutputRawFile.ReadyFile;
> begin
>    inherited;
>    FFile := TFileStream.Create(FFilename, fmCreate or fmShareDenyWrite);
> end;
> 
> ...
> 
> procedure TIBInputRawFile.ReadyFile;
> begin
>    inherited;
>    FFile := TFileStream.Create(FFilename, fmOpenRead or fmShareDenyWrite);
> end;
> 
> {code}
> 
> This will have to be delayed till XE7 to actually get into an official update 
> since it requires breaking the interface.
> 
> Sorry about that, the Unicode part needed a pretty big rewrite on the Delimited 
> side of the inheritance tree.
> 
> -- 
> Jeff Overcash (TeamB)
>        (Please do not email me directly unless  asked. Thank You)
> And so I patrol in the valley of the shadow of the tricolor
> I must fear evil. For I am but mortal and mortals can only die.
> Asking questions, pleading answers from the nameless
> faceless watchers that stalk the carpeted  corridors of Whitehall.
>               (Fish)

Thanx, Jeff.

I did the changes. The raw file export & import works fine. As for the delimited file, the export works fine (at least looks fine) but the import results in an "EConvertError with message 'X' is not a valid date and time" exception. FYI, my date format in the regional settings is 'dd/mm/yyyy' and the date fields in the export file look fine. I don't know if the import is trying to read them in Interbase format, i.e. 'mm/dd/yyyy'.

BTW, do I add "$(BDS)\Source\IBX" to the library path or just copy the new IBX.IBSQL.dcu file created to the "$(BDSLIB)\$(Platform)\release" folder?
0
Mike
6/27/2014 8:12:12 AM
Mike Norayr Monjian wrote:
>> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
>> Mike Norayr Monjian wrote:
>>> I have the following procedure:
>>>
>>> procedure TForm1.Button1Click(Sender: TObject);
>>> var
>>>    RawOutput: TIBOutputRawFile;
>>>    FileName: string;
>>> begin
>>>       RawOutput:= TIBOutputRawFile.Create;
>>>      try
>>>         with IBSQL1 do begin
>>>              close;
>>>              sql.text:= 'select * from employee';
>>>              RawOutput.FileName :=  'TRANS.ibx';
>>>              BatchOutput(RawOutput);
>>>         end;
>>>      finally
>>>         RawOutput.Free
>>>      end;
>>> end;
>>>
>>> In Delphi XE6, even though this procedure is run without any exceptions, no file is being created. It created the file just fine with Delphi XE5 and before.
>>>
>>> Has anything changed? Am I missing something?
>> Yes in finally fixing outputting Unicode character in the delimited file version 
>> I messed up RAW file slightly.
>>
>> In both TIBOutputRawFile and TIBInputRawFile add a public procedure
>>
>> {code}
>>      procedure ReadyFile; override;
>> {code}
>>
>> Then the two new procedures look like
>>
>> {code}
>> procedure TIBOutputRawFile.ReadyFile;
>> begin
>>    inherited;
>>    FFile := TFileStream.Create(FFilename, fmCreate or fmShareDenyWrite);
>> end;
>>
>> ...
>>
>> procedure TIBInputRawFile.ReadyFile;
>> begin
>>    inherited;
>>    FFile := TFileStream.Create(FFilename, fmOpenRead or fmShareDenyWrite);
>> end;
>>
>> {code}
>>
>> This will have to be delayed till XE7 to actually get into an official update 
>> since it requires breaking the interface.
>>
>> Sorry about that, the Unicode part needed a pretty big rewrite on the Delimited 
>> side of the inheritance tree.
>>
>> -- 
>> Jeff Overcash (TeamB)
>>        (Please do not email me directly unless  asked. Thank You)
>> And so I patrol in the valley of the shadow of the tricolor
>> I must fear evil. For I am but mortal and mortals can only die.
>> Asking questions, pleading answers from the nameless
>> faceless watchers that stalk the carpeted  corridors of Whitehall.
>>               (Fish)
> 
> Thanx, Jeff.
> 
> I did the changes. The raw file export & import works fine. As for the delimited file, the export works fine (at least looks fine) but the import results in an "EConvertError with message 'X' is not a valid date and time" exception. FYI, my date format in the regional settings is 'dd/mm/yyyy' and the date fields in the export file look fine. I don't know if the import is trying to read them in Interbase format, i.e. 'mm/dd/yyyy'.
> 

I will look at that, but I made no changes around dates so it might be IB date 
format.  The changes were to support Unicode data in the delimited exports. 
Doesn't mean I didn't break something else I didn't have a test for though.

> BTW, do I add "$(BDS)\Source\IBX" to the library path or just copy the new IBX.IBSQL.dcu file created to the "$(BDSLIB)\$(Platform)\release" folder?

Normally I do not recommend adding the srouce to your library path, but in this 
case doing that might be best.  Breaking hte interface is going to require 
recompiling anything using that unit, which pretty much everything uses IBSQL.pas.

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)
0
Jeff
6/27/2014 4:52:48 PM
Jeff Overcash (TeamB) wrote:
> Mike Norayr Monjian wrote:
>>> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
>>> Mike Norayr Monjian wrote:
>>>> I have the following procedure:
>>>>
>>>> procedure TForm1.Button1Click(Sender: TObject);
>>>> var
>>>>    RawOutput: TIBOutputRawFile;
>>>>    FileName: string;
>>>> begin
>>>>       RawOutput:= TIBOutputRawFile.Create;
>>>>      try
>>>>         with IBSQL1 do begin
>>>>              close;
>>>>              sql.text:= 'select * from employee';
>>>>              RawOutput.FileName :=  'TRANS.ibx';
>>>>              BatchOutput(RawOutput);
>>>>         end;
>>>>      finally
>>>>         RawOutput.Free
>>>>      end;
>>>> end;
>>>>
>>>> In Delphi XE6, even though this procedure is run without any exceptions, no file is being created. It created the file just fine with Delphi XE5 and before.
>>>>
>>>> Has anything changed? Am I missing something?
>>> Yes in finally fixing outputting Unicode character in the delimited file version 
>>> I messed up RAW file slightly.
>>>
>>> In both TIBOutputRawFile and TIBInputRawFile add a public procedure
>>>
>>> {code}
>>>      procedure ReadyFile; override;
>>> {code}
>>>
>>> Then the two new procedures look like
>>>
>>> {code}
>>> procedure TIBOutputRawFile.ReadyFile;
>>> begin
>>>    inherited;
>>>    FFile := TFileStream.Create(FFilename, fmCreate or fmShareDenyWrite);
>>> end;
>>>
>>> ...
>>>
>>> procedure TIBInputRawFile.ReadyFile;
>>> begin
>>>    inherited;
>>>    FFile := TFileStream.Create(FFilename, fmOpenRead or fmShareDenyWrite);
>>> end;
>>>
>>> {code}
>>>
>>> This will have to be delayed till XE7 to actually get into an official update 
>>> since it requires breaking the interface.
>>>
>>> Sorry about that, the Unicode part needed a pretty big rewrite on the Delimited 
>>> side of the inheritance tree.
>>>
>>> -- 
>>> Jeff Overcash (TeamB)
>>>        (Please do not email me directly unless  asked. Thank You)
>>> And so I patrol in the valley of the shadow of the tricolor
>>> I must fear evil. For I am but mortal and mortals can only die.
>>> Asking questions, pleading answers from the nameless
>>> faceless watchers that stalk the carpeted  corridors of Whitehall.
>>>               (Fish)
>> Thanx, Jeff.
>>
>> I did the changes. The raw file export & import works fine. As for the delimited file, the export works fine (at least looks fine) but the import results in an "EConvertError with message 'X' is not a valid date and time" exception. FYI, my date format in the regional settings is 'dd/mm/yyyy' and the date fields in the export file look fine. I don't know if the import is trying to read them in Interbase format, i.e. 'mm/dd/yyyy'.
>>
> 
> I will look at that, but I made no changes around dates so it might be IB date 
> format.  The changes were to support Unicode data in the delimited exports. 
> Doesn't mean I didn't break something else I didn't have a test for though.
> 
>> BTW, do I add "$(BDS)\Source\IBX" to the library path or just copy the new IBX.IBSQL.dcu file created to the "$(BDSLIB)\$(Platform)\release" folder?
> 
> Normally I do not recommend adding the srouce to your library path, but in this 
> case doing that might be best.  Breaking hte interface is going to require 
> recompiling anything using that unit, which pretty much everything uses IBSQL.pas.
> 

I'm not able to reproduce this.  Are you sure that somehow your FormatSettings 
are not being changed between writing and inputing hte file?  That would do it.

Here is the test

{code}
procedure TdmIBSQL.InputDelimitedFileWithDates;
var
   FilePath : String;
   S : Array[0..1] of TDateTime;
   I: Integer;
begin
   FormatSettings.ShortDateFormat := 'dd/mm/yyyy';
   CreateTestDatabase('sysdba', 'masterkey', 'NONE', 3, 4096);
   FilePath := PATH_TO_GDB + 'data.txt';
   try
     ConnectToDatabase(3);
     ActivateTransaction;
     CreateTestTable( TestTableName, 'timestamp' );
     //Setup
     S[0] := StrToDateTime('15/1/2014 12:30');
     S[1] := StrToDateTime('26/8/1965 9:45');
     CreateOutputFile(S);

     // Test inputing the file
     ProcessInputFile;

     IBDataset1.Transaction := IBTransaction1;
     IBDataset1.Database := IBDatabase1;
     IBDataset1.SelectSQL.Text := 'Select ID, DATUM from ' + TestTableName + ' 
order by ID';
     IBDataset1.Active := True;

     for I := Low(S) to High(S) do
     begin
       Comparer.IntegerCompare(I, IBDataset1.Fields[0].AsInteger, 'Wrong Column 
Expected : ' +
           i.ToString + ' Received : ' + IBDataset1.Fields[0].AsString);
       Comparer.StringCompare(DateTimeToStr(S[i]), 
IBDataset1.Fields[1].AsString, 'Expected : ' +
             DateTimeToStr(S[i]) + ' Received : ' + IBDataset1.Fields[1].AsString);
       IBDataset1.Next;
     end;
   finally
     if FileExists(FilePath) then
       DeleteFile(FilePath);
     DropTestDatabase;
     FormatSettings.ShortDateFormat := 'mm/dd/yyyy';
   end;
end;
{code}

Basically I
1. Change the global FormatSettgins to dd/mm/yyyy (mine is normally mm/dd/yyyy)
2. Do basic setup of a DB and a table with 2 columns, an ID of integer, a datum 
of timestamp
3. Output the file after inserting the data, once the file is generated I 
rollback to the table is empty again.  The file looks like

0	15/01/2014 12:30:00 PM
1	26/08/1965 9:45:00 AM

4. Process that input file back into the database.
5. Read the table and compare the values with what is expected.
6. cleanup afterwards

It passes just fine.

Try putting a break point on line 19760 in System.sysUtils and check the value 
of the FormatSettings.ShrotDateformat.  The only thing I can think of is somehow 
that is now not 'dd/mm'yyyy'.  IBX never changes this so I'd look at your code 
for where it might change it temporarily to something else then not back to what 
you need for the file.

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)
0
Jeff
6/27/2014 6:57:19 PM
> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
> Jeff Overcash (TeamB) wrote:
> > Mike Norayr Monjian wrote:
> >>> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
> >>> Mike Norayr Monjian wrote:
> >>>> I have the following procedure:
> >>>>
> >>>> procedure TForm1.Button1Click(Sender: TObject);
> >>>> var
> >>>>    RawOutput: TIBOutputRawFile;
> >>>>    FileName: string;
> >>>> begin
> >>>>       RawOutput:= TIBOutputRawFile.Create;
> >>>>      try
> >>>>         with IBSQL1 do begin
> >>>>              close;
> >>>>              sql.text:= 'select * from employee';
> >>>>              RawOutput.FileName :=  'TRANS.ibx';
> >>>>              BatchOutput(RawOutput);
> >>>>         end;
> >>>>      finally
> >>>>         RawOutput.Free
> >>>>      end;
> >>>> end;
> >>>>
> >>>> In Delphi XE6, even though this procedure is run without any exceptions, no file is being created. It created the file just fine with Delphi XE5 and before.
> >>>>
> >>>> Has anything changed? Am I missing something?
> >>> Yes in finally fixing outputting Unicode character in the delimited file version 
> >>> I messed up RAW file slightly.
> >>>
> >>> In both TIBOutputRawFile and TIBInputRawFile add a public procedure
> >>>
> >>> {code}
> >>>      procedure ReadyFile; override;
> >>> {code}
> >>>
> >>> Then the two new procedures look like
> >>>
> >>> {code}
> >>> procedure TIBOutputRawFile.ReadyFile;
> >>> begin
> >>>    inherited;
> >>>    FFile := TFileStream.Create(FFilename, fmCreate or fmShareDenyWrite);
> >>> end;
> >>>
> >>> ...
> >>>
> >>> procedure TIBInputRawFile.ReadyFile;
> >>> begin
> >>>    inherited;
> >>>    FFile := TFileStream.Create(FFilename, fmOpenRead or fmShareDenyWrite);
> >>> end;
> >>>
> >>> {code}
> >>>
> >>> This will have to be delayed till XE7 to actually get into an official update 
> >>> since it requires breaking the interface.
> >>>
> >>> Sorry about that, the Unicode part needed a pretty big rewrite on the Delimited 
> >>> side of the inheritance tree.
> >>>
> >>> -- 
> >>> Jeff Overcash (TeamB)
> >>>        (Please do not email me directly unless  asked. Thank You)
> >>> And so I patrol in the valley of the shadow of the tricolor
> >>> I must fear evil. For I am but mortal and mortals can only die.
> >>> Asking questions, pleading answers from the nameless
> >>> faceless watchers that stalk the carpeted  corridors of Whitehall.
> >>>               (Fish)
> >> Thanx, Jeff.
> >>
> >> I did the changes. The raw file export & import works fine. As for the delimited file, the export works fine (at least looks fine) but the import results in an "EConvertError with message 'X' is not a valid date and time" exception. FYI, my date format in the regional settings is 'dd/mm/yyyy' and the date fields in the export file look fine. I don't know if the import is trying to read them in Interbase format, i.e. 'mm/dd/yyyy'.
> >>
> > 
> > I will look at that, but I made no changes around dates so it might be IB date 
> > format.  The changes were to support Unicode data in the delimited exports. 
> > Doesn't mean I didn't break something else I didn't have a test for though.
> > 
> >> BTW, do I add "$(BDS)\Source\IBX" to the library path or just copy the new IBX.IBSQL.dcu file created to the "$(BDSLIB)\$(Platform)\release" folder?
> > 
> > Normally I do not recommend adding the srouce to your library path, but in this 
> > case doing that might be best.  Breaking hte interface is going to require 
> > recompiling anything using that unit, which pretty much everything uses IBSQL.pas.
> > 
> 
> I'm not able to reproduce this.  Are you sure that somehow your FormatSettings 
> are not being changed between writing and inputing hte file?  That would do it.
> 
> Here is the test
> 
> {code}
> procedure TdmIBSQL.InputDelimitedFileWithDates;
> var
>    FilePath : String;
>    S : Array[0..1] of TDateTime;
>    I: Integer;
> begin
>    FormatSettings.ShortDateFormat := 'dd/mm/yyyy';
>    CreateTestDatabase('sysdba', 'masterkey', 'NONE', 3, 4096);
>    FilePath := PATH_TO_GDB + 'data.txt';
>    try
>      ConnectToDatabase(3);
>      ActivateTransaction;
>      CreateTestTable( TestTableName, 'timestamp' );
>      //Setup
>      S[0] := StrToDateTime('15/1/2014 12:30');
>      S[1] := StrToDateTime('26/8/1965 9:45');
>      CreateOutputFile(S);
> 
>      // Test inputing the file
>      ProcessInputFile;
> 
>      IBDataset1.Transaction := IBTransaction1;
>      IBDataset1.Database := IBDatabase1;
>      IBDataset1.SelectSQL.Text := 'Select ID, DATUM from ' + TestTableName + ' 
> order by ID';
>      IBDataset1.Active := True;
> 
>      for I := Low(S) to High(S) do
>      begin
>        Comparer.IntegerCompare(I, IBDataset1.Fields[0].AsInteger, 'Wrong Column 
> Expected : ' +
>            i.ToString + ' Received : ' + IBDataset1.Fields[0].AsString);
>        Comparer.StringCompare(DateTimeToStr(S[i]), 
> IBDataset1.Fields[1].AsString, 'Expected : ' +
>              DateTimeToStr(S[i]) + ' Received : ' + IBDataset1.Fields[1].AsString);
>        IBDataset1.Next;
>      end;
>    finally
>      if FileExists(FilePath) then
>        DeleteFile(FilePath);
>      DropTestDatabase;
>      FormatSettings.ShortDateFormat := 'mm/dd/yyyy';
>    end;
> end;
> {code}
> 
> Basically I
> 1. Change the global FormatSettgins to dd/mm/yyyy (mine is normally mm/dd/yyyy)
> 2. Do basic setup of a DB and a table with 2 columns, an ID of integer, a datum 
> of timestamp
> 3. Output the file after inserting the data, once the file is generated I 
> rollback to the table is empty again.  The file looks like
> 
> 0	15/01/2014 12:30:00 PM
> 1	26/08/1965 9:45:00 AM
> 
> 4. Process that input file back into the database.
> 5. Read the table and compare the values with what is expected.
> 6. cleanup afterwards
> 
> It passes just fine.
> 
> Try putting a break point on line 19760 in System.sysUtils and check the value 
> of the FormatSettings.ShrotDateformat.  The only thing I can think of is somehow 
> that is now not 'dd/mm'yyyy'.  IBX never changes this so I'd look at your code 
> for where it might change it temporarily to something else then not back to what 
> you need for the file.
> 
> -- 
> Jeff Overcash (TeamB)
>        (Please do not email me directly unless  asked. Thank You)
> And so I patrol in the valley of the shadow of the tricolor
> I must fear evil. For I am but mortal and mortals can only die.
> Asking questions, pleading answers from the nameless
> faceless watchers that stalk the carpeted  corridors of Whitehall.
>               (Fish)

Hi Jeff. I checked. The value of ShortDateFormat is 'dd/mm/yyyy' and is never changed in the code. If the case was the ShortDateFormat changing, the TIBInputRawFile wouldn't work either, right? BTW, the exception is in the ReadParameters function in the IBX.IBSQL on the "Inc(curcol)" line:

function TIBInputDelimitedFile.ReadParameters: Boolean;
var
  i, curcol: Integer;
  Col: String;
begin
  result := False;
  if FCurrentData = '' then
    FCurrentData := ReadLine;
  if not FEOF then
  begin
    curcol := 0;
    repeat
      i := GetColumn(Col);
      if (i = 0) then
        FEOF := True;
      if (curcol < Params.Count) then
      begin
        try
          if (Length(Col) = 0) and
             (ReadBlanksAsNull) then
            Params[curcol].IsNull := True
          else
            Params[curcol].AsString := col;
          Inc(curcol); //<<<<<<<<<<<<<<<<<<<<<<<<<< Here is the exception
        except
          on E: Exception do
          begin
            if not (FEOF and (curcol = Params.Count)) then
              raise;
          end;
        end;
      end;
    until (FEOF) or (i = 2);
    result := ((FEOF) and (curcol = Params.Count)) or
              (not FEOF);
  end;
end;
0
Mike
6/30/2014 2:51:22 PM
Reply:

Similar Artilces:

How to use a delphi XE3 obj file in delphi 2007?
Hi, I'm migrating an application from delphi 2007 to delphi XE3 and I would like to do it in several steps. To do this I need to use a part of my new code (XE3) in the current delphi 2007 application. So I want to use the .obj file from my XE3 file. I know I have to use the {$L 'Filename'} and I know that I have to declare the functions that I want to use in external in my D2007 project. I wanted to make an easy and simple example to see how it works with only 1 function 'hello world' compiled in obj with XE3 but I can't find the way to use it in D2007. In D200...

Creating Database Files using Firedac (Delphi XE7)
I have been able to get Firedac to display and edit the following file types in a simple app using FDConnection, FDTable, FDPhysSQLiteDriverLink (and others according to file type) : sdb, gdb, mdb and xls (with ODBC link and drivers). I have been able to create a SQLLite File (.sdb) from scratch and add tables using roughly: FDTable1.Connection = FDConnection1; (set in form) FDConnection1.Params.Clear; FDConnection1.Params.Add('DriverID=SQLite'); FDConnection1.Params.Add('Database='+DATABASE_FILE); FDConnection1.ResourceOptions.DefaultParamType := ptOutput; ...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

How to use a .dmp file for a system which crashes using a delphi app
Hi, I put this post here because I am not sure of the best location. I have been given a memory dump (.dmp) file by a client who thinks that a Delphi 7 application is causing their system to blue screen from time to time. Does anyone know how I can use this .dmp file to locate the problem in the delphi app? The build the client is using has debug symbols turned on. I have downloaded Microsoft Debugging Tools for windows and have dupmchk.exe (and kd.exe) but I would really appreciate some help with how these or any other useful tools should be used? Many thanks Ben > I have down...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

To use or not to use Delphi
Sadly, it seems to me that there is a sort of race between the two threads, for and against using Delphi in new projects, with more or less the same users posting in both threads. Arguments are fiercely debated in both camps. Borland had their own vision. As a community, now that Delphi has changed ownership I believe we should try to be more consistent, more clear, and more articulate in what we expect from Embercadero in terms of Delphi. We can contribute to keeping Delphi alive and moving in the right direction. "Laurent Cocea" schrieb: > Sadly, it seems to me that there ...

create PDF file from delphi
Hello, Is it posible to export data from delphi as a pdf file from qreport for example or from any other object such as string grid. is there any commponents that do so ? thank you yuda yuda, On Thu, 06 May 2010 09:47:02 +0100, yuda levi wrote: > Is it posible to export data from delphi as a pdf file from qreport for > example or from any other object such as string grid. > is there any commponents that do so ? pdfFactory (www.fineprint.com) together with the info in the "Dev Kit" works for us. Since it is implemented as a printer (rather than a...

can i use delphi 2007 bpls in delphi 2009
can i use delphi 2007 bpls in delphi 2009 ? "Gaetan SIRY" skrev i meddelelsen news:8703@forums.codegear.com... > can i use delphi 2007 bpls in delphi 2009 ? No. -- Finn Tolderlund The compatiblity between D2006 and D2007 was unique. Normaly they can't be compatible because new version enhance/change the API. And D2009 defines String = Unicode where older version has String = Ansistring so D200x/Dx-BPL are 200% incompatible with D2009. ...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

How to create a chart using these files (Orig. Est,Current Est,Hours How to create a chart using these files (Orig. Est,Current Est,HoursWorked,Hours Left,%Complete,Gain,Deadline) of bug.
Hi, How to create a chart using these files (Orig. Est,Current Est,Hours Worked,Hours Left,%Complete,Gain,Deadline) of bug. Here I am having a custom field called Sprint. Values are Sprint 1, Sprint 2 and Etc. Sprint value for ten bugs is Sprint 1. Here Can you help me, How to create a Burn down chart for Bugs having Sprint 1 is the value of Sprint custom field. Thanks. Regards, Navanethanmca@gmail.com ...

MOVED: Use Delphi XE TLB importer in Delphi 2007?
....to the ActiveX group: https://forums.embarcadero.com/thread.jspa?threadID=47170 -- Craig Stuntz · Vertex Systems Corp. · Columbus, OH Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz/ ...

Using Delphi and interbase with ASP.net
Is there any way to use Delphi and/or interbase with ASP.net? Any help would be appreciated. Thanks! The Borland website indicates that Delphi works with the .net framework. I have been chatting with a customer of mine who uses my custom controls in their development of websites using ASP.NET. So I think the answer is "yes" for Delphi. I recommend checking the Borland site (www.Borland.com) for details and FAQs.--- Peter BlumCreator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Packagewww.PeterBlu...

use html file as delphi help
can I call to html file as help file instade of hlp file ? yuda levi wrote: > can I call to html file as help file instade of hlp file ? I do it by setting the form's HelpIndex to a non-zero value, then in the FormHelp event I ShellExecute the related .html file, set CallHelp := False and Result := True. -- Ray Marron > can I call to html file as help file instade of hlp file ? Try looking here: http://www.helpware.net/delphi/ I used their technique in one project and it seemed to work pretty well, but I didn't extensively test it. It's free, so try it ...

Using CHM files in Delphi 2009??
Hello Everyone, I need to be able to use CHM help file with my application. In the past I used the older format HLP files. I tried changing the file in the Project Properties - but it only seems to use HLP files - so I manually changed it - and cannot use the older calls like Application.HelpJump('Welcometopic'); It tells me that there is no Topic Based help System installed. So - I figure I am missing something very simple. Can others tell me how they are launching the CHM files from their apps? I would be happy launching just to the Table of Contents...

Web resources about - No File is Being Created when Using TIBOutputRawFile in Delphi XE6 - embarcadero.delphi.interbase

Resources last updated: 12/22/2015 7:09:22 PM