Subject | REVOKE and GRANT |
---|---|
Author | jaguarius2003 |
Post date | 2004-05-28T20:59:51Z |
This command:
ExecuteDDL('REVOKE ALL ON ' + CurrentTable.Text + ' FROM ' +
lvPermissions.Selected.Caption, error);
is not returning an error when the current user does not have
reference permission, but
DataAcc.ExecuteDDL('GRANT ALL ON ' + CurrentTable.Text + ' to ' +
lvPermissions.Selected.Caption, error);
acts correctly and generates an error. Can anyone explain this? I
should note that the permissions are NOT revoked in this case, but
there is no error which is causing program flow problems.
Here is my ExecuteDDL proc
function TDataAcc.ExecuteDDL(DDL:String; var error:string):boolean;
begin
result := false;
error:='';
try
IB_DSQL.SQL.Text := DDL;
IB_DSQL.Execute;
result := true;
except
on e:Exception do
begin
error := E.Message;
end;
end;
end;
I have also tried putting the DSQL in manually in the revoke statement
to make sure it wasn't my procedures faults but again, no error.
Thanks.
Jason S. Gagnon
ExecuteDDL('REVOKE ALL ON ' + CurrentTable.Text + ' FROM ' +
lvPermissions.Selected.Caption, error);
is not returning an error when the current user does not have
reference permission, but
DataAcc.ExecuteDDL('GRANT ALL ON ' + CurrentTable.Text + ' to ' +
lvPermissions.Selected.Caption, error);
acts correctly and generates an error. Can anyone explain this? I
should note that the permissions are NOT revoked in this case, but
there is no error which is causing program flow problems.
Here is my ExecuteDDL proc
function TDataAcc.ExecuteDDL(DDL:String; var error:string):boolean;
begin
result := false;
error:='';
try
IB_DSQL.SQL.Text := DDL;
IB_DSQL.Execute;
result := true;
except
on e:Exception do
begin
error := E.Message;
end;
end;
end;
I have also tried putting the DSQL in manually in the revoke statement
to make sure it wasn't my procedures faults but again, no error.
Thanks.
Jason S. Gagnon