V4RB - Aggregate Functions, Permissions

RB User fitzbew at nc.rr.com
Fri Aug 26 15:59:24 CDT 2005


Using Mac OX 10.3.9, Valentina 1.10, RealBasic 2005R2

****

Hi,

One of my apps requires the user to download a small Valentina db file that
is used by my app to populate some arrays and dictionaries.  The app does
not overtly write to the db file, but Valentina may be doing some indexing
or such.

Under Mac OS X, if a user downloads the db file via a browser and runs the
app, all is well.  No problems are encountered by my application.

But if another user logs in on the same OS X machine under another User ID,
Valentina fails when building a recordset that uses an aggregate function:

"Select Min(Date_from_YYYY) from allmyrecords"

No error is reported to Valentina( error strings and error code is not
populated), the recordset is just Nil.

Other read-only recordsets built without aggregate functions are created
with no difficulty by any user on the same machine.

Permissions-wise, the db file Owner is the user that downloaded and
installed the app. Other users on the same machine have only Read access to
the db file.

The second user (permissions-wise) has only Read access to the DB, which
should be fine, no writing is necessary.

I found an entry in the Valentina discussions archive that says Valentina
must build a file in the user's Temp directory when an aggregate function is
used.

I'm confused because the second user (the non-Owner) should have write
access to their own Temp directory, yet Valentina still breaks.

I have worked around the issue by just extracting a full recordset, sorting
it, and then pulling off the first record.

Is my interpretation of the problem correct?  Any other workarounds? (Aside
from the one I am using now.) Should I try to manipulate the file
permissions within RB?

(I cannot upgrade to Valentina 2.X, until encryption is in place.)

Russ



More information about the Valentina mailing list