Subject Re: Rowset at the end of Set
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Sun, 18 Feb 2024 16:32:10 +0530
Newsgroups dbase.getting-started

Good Evening Mustansir,

> I getting an alert message (attached screenshot) in a form that I open and without doing anything even if  I close it.
>
> There is rowset created from a MySQL temporary table xyz with ADOQUERY which has no records in it but it is linked to a grid and so is activated at the opining of the form.
>
> So while form is open if I make this query active property to false , I get this alert message (this is what happens when I close the form without doing anything).
>
> When i add a record to this query using executeSQL for the first record and requery() the rowset I get this alert. Later for subsequent additions all works fine.
>
> Can anybody throw an idea how to avoid this alert message.

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.

Regards
Akshat