Subject Re: Creting FB user from an application
Author Adam
--- In firebird-support@yahoogroups.com, "nikicab_1999"
<nikicab_1999@y...> wrote:
>
> Hi all,
>
> I hope someone will be able to help me out.
>
> -I have AppServer (multithreaded, one thread per db connection) which
> is connected to a FB database.
> - AppServer uses FB logins (users) as application users i.e. every
> AppServer user must have FB login (USERID).
>
> Question: How to create a FB user from the AppServer thread?
> Comment: I have one user designated as SysAdmin. That user is created
> as Fb user. How can I, logged in as SysAdmin:
> try
> CreateNewFbUser(sUserName, sPwd);
> except on e: exception do
> begin
> if e.Message='User already exists' then show warning
> and registed sUserName with AppServer database
> end;
>
> Thanks,
> Nick
>


Nick,

What connection components are you using? User management happens on a
"server" level rather than a "database" level, but most component sets
I have seen have a component for user management.

Also, now I am being picky, do not catch all exceptions, only catch
the user already exists exception and re-raise any others. ;)

Adam