Subject |
Re: Rowset at the end of Set |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Sat, 17 Feb 2024 13:44:08 +0200 |
Newsgroups |
dbase.getting-started |
On 2024/02/16 11:01, Mustansir A Ghor wrote:
> Dear All
>
> 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.
>
> Best Regards
> Mustansir
>
>
>
I no longer have MySQL on my computer so I tried your datamodule and
form using Firebird 3. I got the same "End of rowset" error when I
closed the form. I eventually got rid of the error by nulling the
ADOquery object before closing the form. This may, however, not work
with MySQL.
Unfortunately this only works when the pushbutton is clicked to close
the form. If the red X button at the top right corner of the form is
used to close the form the error message is shown. SysClose() in
miscapi.prg in the dUFLP can, however, be used to disable the red X
button.
I haven't tried this but it may be possible to reinstate the red X once
a record has been saved to the temporary table as you've found that with
at least one record in the table the problem goes away.
function PBCLOSE_onClick1()
form.qtempsal = null
form.close()
return
Mervyn.
|
|