Subject Re: Please help me
Author james_027
Hi Helen,

> You get a live dataset, i.e. one that gives access to the underlying
tables
> for inserting, updating or deleting, in two ways, either:
>
> 1. Set RequestLive true; or
> 2. Set the XXXXXSQL properties.
>
I see. Thanks.

> Read the documentation for SQL privileges - this is a database
thing, not
> an IBO thing. A role is a package of privileges that can be GRANTed
to one
> or more users. Don't grant any other privileges to those users, or
to PUBLIC.
>
> At login time, the user must log in with both the user name and the
role.

Everything on the server side is already setup. I just run into
troubles on the client side.
>
> >That IBO will know what previlidges are allow to the user/roles?

> No, of course IBO won't know that. But one assumes that you do. IBO
> doesn't need to know. The server will simply return an exception if
that
> user tries to log in without the role.
>
> IBO does support ROLE at login. See the SQLRole property of
TIB_Connection.
>
> So, for example,
> ....
> type
> ...
> MyDatamodule = class(TDataModule)
>
> ..........
>
> private
> FIdiotProtect: Boolean;
> procedure SetIdiotProtect (Value: Boolean);
> ....
> public
> property IdiotProtect: Boolean read FIdiotProtect write
SetIdiotProtect;
> ....
>
> implementation
>
> procedure MyDataModule.SetIdiotProtect (Value: Boolean);
> begin
> FIdiotProtect := Value;
> end;
> ...
>
> Once you implement the SetIdiotProtect procedure, you can read the
SQLRole
> property at connect time and set the internal variable FIdiotProtect
> accordingly. Then your application can read the property
IdiotProtect from
> anywhere, e.g. in the Create method of a dataset that you want to
protect:
>
> ..
> if not IdiotProtect then
> begin
> // proceed to apply strings to the XXXSQL properties, or to set
> RequestLive true
> end
>
Do you mean to say that I have to customize the xxxsql properties for
every role? If that's what iam going to do I think there no need to
set the priviledge on the server side. My problem is that when a user
without a insert priviledge by just opening the dataset produce an
error because of the preparing of the xxxsql properties set. But I
understand that I won't allow him to insert when he tries to. So I
wish to avoid the preparing of the xxxsql properties.

James