Subject Permissions
Author Rick Roen
IBO 4.5B

This is the first occasion I've had the need to write a program that
limits access based on users rights - it a time clock program that
includes administrative functions for adding employees etc.

Here is a very simple senario that will show my problem:

TIB_Connection with a TIB_Query/TIB_DataSource/TIB_Grid

I log into the TIB_Connection when I open the program and open the
Query which contains SQL to show four employees. The TIB_Query
contains an Update/Edit/Delete statment.

Everything is ok when I log is as someone with Admin rights. When I
log in as a user without Update/Write rights, I get an errorcode of
335544352 "no permission for update/write".

I trap this error in the OnError event of the TIB_Connection.

So I set the TIB_Query component to be READONLY since there was no
ability to update the Employee table from this form anyway, but I
still get the same error, AND it seems to be repeated for each column
and row of the table.

If I take out the Update/Edit/Delete statements, then I have no
problem opening the table.

I know this error is closely tied to Firebird, however I wondered if
there was any way around it in IBO. Otherwise I guess the best thing
to do is just see if the user has update rights before opening the
table. Is there some way to query the DB about rights, or do I just
try to open and adjust if there is a failure?

Thanks for any advise,