Subject | Re: [IBO] Programmatically grant role to user |
---|---|
Author | Dmitry Beloshistov |
Post date | 2006-03-01T15:49:30Z |
Hello, jackmills75!
You wrote to <IBObjects@yahoogroups.com> on Wed, 01 Mar 2006 14:24:28 -0000:
j> Hi
j> I am trying to grant a role to a user from within my application.
j> Using TIBODatabase & TIBOQuery components. (recently converted from
j> BDE)
Transaction.StartTransaction;
//---
with IBOQuery do
begin
Close; SQL.Text:=Format('GRANT %s TO %s',[RoleName,UserName]);
Execute;
// ^^^^ No Open! Use Execute or ExecSQL instead.
Close;
end;
//--
Transaction.Commit;
Transaction.Close;
WBR,Dmitry Beloshistov AKA [-=BDS=-]
You wrote to <IBObjects@yahoogroups.com> on Wed, 01 Mar 2006 14:24:28 -0000:
j> Hi
j> I am trying to grant a role to a user from within my application.
j> Using TIBODatabase & TIBOQuery components. (recently converted from
j> BDE)
Transaction.StartTransaction;
//---
with IBOQuery do
begin
Close; SQL.Text:=Format('GRANT %s TO %s',[RoleName,UserName]);
Execute;
// ^^^^ No Open! Use Execute or ExecSQL instead.
Close;
end;
//--
Transaction.Commit;
Transaction.Close;
WBR,Dmitry Beloshistov AKA [-=BDS=-]