Change user on Interbase database during runtime?
Posted on 2005-04-13
Im using a TSQLConnection to access my database (interbase), and when my application
starts up, Im logging in as SYSDBA. But what I would like to do right after
1. Create a user
2. Give that user full access to all tables
3. Change user from SYSDBA to my created user
Is this possible to do with only a TSQLConnection?
I have managed to create a user by the following code:
with IBSecurityService1 do
ServerName := DataBaseAliasString;
LoginPrompt := False;
Active := True;
UserName := edtUser.Text;
// FirstName := Edit2.Text;
// MiddleName := Edit3.Text;
// LastName := Edit4.Text;
// UserID := StrToInt(Edit5.Text);
// GroupID := StrToInt(Edit6.Text);
Password := edtPassword.Text;
Active := False;
And after creating the user as shown above I have tried to close the
TSQLConnection and setting the params acordingly to my new user, and then
enabled the connected property again. But this does not work, Im still
logged in as SYSDBA.
Does anyone have any idea on how to do this? Any help or suggestion is much
In Short How do I change user during runtime?