Subject |
Re: Rowset at the end of Set |
From |
Ken Mayer <dbase@nospam.goldenstag.net> |
Date |
Sun, 18 Feb 2024 05:27:00 -0800 |
Newsgroups |
dbase.getting-started |
On 2/18/2024 3:57 AM, Mervyn Bick wrote:
> On 2024/02/18 13:02, Akshat Kapoor wrote:
>> Good Evening Mustansir,
>
>
>> I may be wrong,
>> Is your form trying to do a implicit save?
>> Is the grid editable?
>>
>> Have your tried making the grid readonly.
>>
>> The rowset is linked to grid. There is nothing in the rowset, it may
>> be null. But the field in grid may not be retaining the null value. It
>> may be a space.
>>
>> When you try navigation dbase tries an implicit save to save the
>> changes. But there is no row to save the changes and hence the error.
>>
>> I would have loved trying your code but I am not coding much these days.
>
> My money is on a bug in the ADOquery and/or the ADOrowset object.
>
> I no longer have access to MySQL but using an ADOdatabase with an
> ADOquery and Firebird to display an empty table or empty GTT in a grid
> also causes an "End of rowset" error when the form closes.
>
> Accessing the same table and GTT using standard database and query
> objects to access Firebird via the BDE does not cause an error when the
> form is closed.
>
> A work-around is to null the ADOquery object before closing the form.
This isn't ADO specific. I did this with a local table and got the same
results. It's specifically the grid's editorControl being set to the
editor, and an empty rowset. Very odd.
Ken
--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
dBASE DOS to Windows Tutorial:
http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm
|
|