Subject Re: requery problem (semi reason)
From Charlie <tm@tc.com>
Date Thu, 09 Jan 2020 16:47:50 -0500
Newsgroups dbase.getting-started

OK after a fabulous round of golf this morning I have figured out a great work around.  I would love to know why this happens as it is still happening on my other project.  And as you said Mervyn changing to an index in the rowset did not fix the problem but it allowed me to do some cool things since the grid isn't read only now.

If anyone would like to see my full script on this (or at least the old one that doesn't work), I'd be happy to show it.  I would love to figure this out someday but have to move on right now!

Thanks everyone for your help and suggestions!!!

Mervyn Bick Wrote:

> On 09/01/2020 13:31, Charlie wrote:
> > I have each query indexed and filtered differently but in sql.  I am going to try to index them in the rowset.  I have a feeling that may be the problem.  I just figured out if I use order by in sql that query is read only in the grid.  That may well have something to do with it.   Well I'll try it later after golf.
> >
>
> If you use an ORDER BY clause please don't assign an index to the
> rowset's indexName property.  Use one or the other but not both.
>
> An ORDER BY clause causes a rowset to be read-only with one exception.
> If the ORDER BY is on one field only and there is a simple index on that
> field the rowset can be written to even if the index isn't assigned.  It
> just has to exist and the BDE will recognise it.
>
> Your master7.rowset should be writable if there is an simple index on
> partID.  master9.rowset is read-only because it is ordered on two fields.
>
> Trying to write to a read-only rowset shouldn't cause dBASE to crash.
> All that should happen is an error message telling you the rowset is
> read-only.
>
> Mervyn.