Board index » delphi » ERROR : Either BOF or EOF is True, or the current record has been deleted

ERROR : Either BOF or EOF is True, or the current record has been deleted

Hello
I get "Either BOF or EOF is True, or the current record has been
deleted" error when i execute the below piece of code,I have tried closing the dataset etc etc...

The list box contains the table names i need

===================================================
for i :=0 to listbox1.Items.Count -1 do
begin
if(ADODataSet1.Active) then
    ADODataSet1.Active := false;
ADODataSet1.CommandText := 'SELECT * FROM ' +
listbox1.Items.Strings[i];
ADODataSet1.Active := true;

if(ADODataSet1.Recordset.RecordCount > 0) then
begin
    ADODataSet1.SaveToFile('E:\Develop\Bb\Databases\Backup\'+
     listbox1.Items.Strings[i] + '.xml',pfXML);
    ADODataSet1.Close;
end;
end;
===================================================

please help

Thnx
Ukumashi

 

Re:ERROR : Either BOF or EOF is True, or the current record has been deleted


I think you have to upgrade your ADO.

When I was working delphi 5, I'm had a seam problem.

I needed install two upgrades:

Look for this files in borland webpage: d5adoupdate.exe and d5adoupdate2.exe

If you are using Delphi 6, look for the last upgrade for this delphi
version.

Cristian

Quote
"Ukumashi" <nambiar_...@hotmail.com> wrote in message

news:3d242dad$1_1@dnews...
Quote

> Hello
> I get "Either BOF or EOF is True, or the current record has been
> deleted" error when i execute the below piece of code,I have tried closing

the dataset etc etc...
Quote

> The list box contains the table names i need

> ===================================================
> for i :=0 to listbox1.Items.Count -1 do
> begin
> if(ADODataSet1.Active) then
>     ADODataSet1.Active := false;
> ADODataSet1.CommandText := 'SELECT * FROM ' +
> listbox1.Items.Strings[i];
> ADODataSet1.Active := true;

> if(ADODataSet1.Recordset.RecordCount > 0) then
> begin
>     ADODataSet1.SaveToFile('E:\Develop\Bb\Databases\Backup\'+
>      listbox1.Items.Strings[i] + '.xml',pfXML);
>     ADODataSet1.Close;
> end;
> end;
> ===================================================

> please help

> Thnx
> Ukumashi

Re:ERROR : Either BOF or EOF is True, or the current record has been deleted


I think you have to upgrade your ADO.

When I was working delphi 5, I'm had a seam problem.

I needed install two upgrades:

Look for this files in borland webpage: d5adoupdate.exe and d5adoupdate2.exe

If you are using Delphi 6, look for the last upgrade for this delphi
version.

Cristian

Quote
"Ukumashi" <nambiar_...@hotmail.com> wrote in message

news:3d242dad$1_1@dnews...
Quote

> Hello
> I get "Either BOF or EOF is True, or the current record has been
> deleted" error when i execute the below piece of code,I have tried closing

the dataset etc etc...
Quote

> The list box contains the table names i need

> ===================================================
> for i :=0 to listbox1.Items.Count -1 do
> begin
> if(ADODataSet1.Active) then
>     ADODataSet1.Active := false;
> ADODataSet1.CommandText := 'SELECT * FROM ' +
> listbox1.Items.Strings[i];
> ADODataSet1.Active := true;

> if(ADODataSet1.Recordset.RecordCount > 0) then
> begin
>     ADODataSet1.SaveToFile('E:\Develop\Bb\Databases\Backup\'+
>      listbox1.Items.Strings[i] + '.xml',pfXML);
>     ADODataSet1.Close;
> end;
> end;
> ===================================================

> please help

> Thnx
> Ukumashi

Re:ERROR : Either BOF or EOF is True, or the current record has been deleted


I think you have to upgrade your ADO.

When I was working delphi 5, I'm had a seam problem.

I needed install two upgrades:

Look for this files in borland webpage: d5adoupdate.exe and d5adoupdate2.exe

If you are using Delphi 6, look for the last upgrade for this delphi
version.

Cristian

Quote
"Ukumashi" <nambiar_...@hotmail.com> wrote in message

news:3d242dad$1_1@dnews...
Quote

> Hello
> I get "Either BOF or EOF is True, or the current record has been
> deleted" error when i execute the below piece of code,I have tried closing

the dataset etc etc...
Quote

> The list box contains the table names i need

> ===================================================
> for i :=0 to listbox1.Items.Count -1 do
> begin
> if(ADODataSet1.Active) then
>     ADODataSet1.Active := false;
> ADODataSet1.CommandText := 'SELECT * FROM ' +
> listbox1.Items.Strings[i];
> ADODataSet1.Active := true;

> if(ADODataSet1.Recordset.RecordCount > 0) then
> begin
>     ADODataSet1.SaveToFile('E:\Develop\Bb\Databases\Backup\'+
>      listbox1.Items.Strings[i] + '.xml',pfXML);
>     ADODataSet1.Close;
> end;
> end;
> ===================================================

> please help

> Thnx
> Ukumashi

Re:ERROR : Either BOF or EOF is True, or the current record has been deleted


That was the problem.. its solved now.
Thnx

Ukumashi

Quote
"Cristian Custodio" <crist...@totall.com.br> wrote:

>I think you have to upgrade your ADO.

>When I was working delphi 5, I'm had a seam problem.

>I needed install two upgrades:

>Look for this files in borland webpage: d5adoupdate.exe and d5adoupdate2.exe

>If you are using Delphi 6, look for the last upgrade for this delphi
>version.

>Cristian

>"Ukumashi" <nambiar_...@hotmail.com> wrote in message
>news:3d242dad$1_1@dnews...

>> Hello
>> I get "Either BOF or EOF is True, or the current record has been
>> deleted" error when i execute the below piece of code,I have tried closing
>the dataset etc etc...

>> The list box contains the table names i need

>> ===================================================
>> for i :=0 to listbox1.Items.Count -1 do
>> begin
>> if(ADODataSet1.Active) then
>>     ADODataSet1.Active := false;
>> ADODataSet1.CommandText := 'SELECT * FROM ' +
>> listbox1.Items.Strings[i];
>> ADODataSet1.Active := true;

>> if(ADODataSet1.Recordset.RecordCount > 0) then
>> begin
>>     ADODataSet1.SaveToFile('E:\Develop\Bb\Databases\Backup\'+
>>      listbox1.Items.Strings[i] + '.xml',pfXML);
>>     ADODataSet1.Close;
>> end;
>> end;
>> ===================================================

>> please help

>> Thnx
>> Ukumashi

Other Threads