Subject | Re: [IBO] error in alteruser |
---|---|
Author | Virtual Memory Developers of System |
Post date | 2008-04-14T16:22:58Z |
Hi Dmitriy
My FB is 1.5.5 and my operation system is Windows XP with Delphi5
Dmitriy A. Beloshistov escreveu:
My FB is 1.5.5 and my operation system is Windows XP with Delphi5
Dmitriy A. Beloshistov escreveu:
>[Non-text portions of this message have been removed]
>
> FB version? FB 2.0 - service API only...
>
> Var ss:TIBOSecurityService;
> // ......... Following code work for FB 1.5 and FB 2.x ..............
> with ss do
> begin
> Params.Add('USER_NAME=' + edtLoginName.Text); // admin name
> Params.Add('PASSWORD=' + edtLoginPswd.Text); // admin password
> ServerName := ibc.Server; // IBC is TIB_Connection
> UserName := edtAddUser.Text; // new user name
> Password := edtAddUserPswd.Text; // new user password
> Protocol := ibc.Protocol; // IB_Connection protocol
> LoginPrompt := False; // this is important if you are supplying
> login params
> try
> Attach;
> try
> if not Active then
> begin
> Active :=True;
> ServiceStart;
> end;
> AddUser;
> MessageDlg('User added successfully', mtInformation, [mbOK], 0);
> except
> ibc.IB_Session.HandleException(Sender);
> SysUtils.Abort;
> end;
> finally
> Detach;
> end;
> end;
>
> For manipulation user right use special SQL statements as:
> CREATE ROLE NEWROLE;
> GRANR NEWROLE TO USERNAME;
> GRANT SELECT ON MYTABLE TO USERNAME;
> GRANT SELECT ON MYTABLE2 TO NEWROLE;
> Etc - see IB/FB documentation for details......
>
> You can execute these statements via using TIB_Query, TIB_DSQL
> components...
>
> WBR,Dmitry Beloshistov AKA [-=BDS=-]
> -----Original Message-----
> From: IBObjects@yahoogroups.com <mailto:IBObjects%40yahoogroups.com>
> [mailto:IBObjects@yahoogroups.com <mailto:IBObjects%40yahoogroups.com>] On
> Behalf Of Virtual Memory Developers of System
> Sent: Monday, April 14, 2008 5:08 PM
> To: ibobjects@yahoogroups.com <mailto:ibobjects%40yahoogroups.com>;
> jason@... <mailto:jason%40ibobjects.com>
> Subject: [IBO] error in alteruser
>
> i am using the command
>
> try
> DMMain.DbMain.AlterUser(uaAddUser,
> QryL180L180_ID.AsString,
> QryL180L180_SENHA.AsString,
> '',
> QryL180L180_ID.AsString,
> '',
> '' );
> except
> showmessage('User already exists!');
> end
>
> and return the error :
>
> undeclared identifier: 'uaAddUser'
>
> I need to add a user in the database directly from the application.
>
> Thank you for help.
>
> Flavio Macedo
>
>