Problem with EOF or BOF
Posted: Tue 18 Mar 2008 19:23
Hello,
i have a problem when i am navigating through a IBCTable or IBCQuery result.
For example: I have a table with four entries. After Activating the table by setting active property to true, i start with the first record. I have a button called next, which uses the Next() method. Thereafter i am checking, if EOF is true to disable the next button. But the following happens:
I go from the third to the fourth entry with Next. The fourth entry is the last one. But EOF still give me false retour. By using Next again EOF is true, but i am still at the end of the table.
The same is with BOF, getting true after reaching the first entry and using Prior.
Using DBNavigator component gives me the same behaviour.
My workaroung is to get the numbers of records and doing the navigation with comparing the position with the records number.
Does anybody have an idea to solv these problems?
Regards,
Firedbird-Hunter
i have a problem when i am navigating through a IBCTable or IBCQuery result.
For example: I have a table with four entries. After Activating the table by setting active property to true, i start with the first record. I have a button called next, which uses the Next() method. Thereafter i am checking, if EOF is true to disable the next button. But the following happens:
I go from the third to the fourth entry with Next. The fourth entry is the last one. But EOF still give me false retour. By using Next again EOF is true, but i am still at the end of the table.
The same is with BOF, getting true after reaching the first entry and using Prior.
Using DBNavigator component gives me the same behaviour.
My workaroung is to get the numbers of records and doing the navigation with comparing the position with the records number.
Does anybody have an idea to solv these problems?
Regards,
Firedbird-Hunter