Hallo,
Ik voeg in een app users toe aan Interbase:
uses IB, IBExternals, IBHeader;
procedure AddDBUser(UserName, Password: string);
var
p_status: PISC_STATUS;
status: array[0..19] of ISC_STATUS;
user_sec_data1: TUserSecData;
begin
p_status := @status[0];
user_sec_data1.protocol := sec_protocol_tcpip;
user_sec_data1.server := 'localhost';
user_sec_data1.user_name := PChar(UserName);
user_sec_data1.password := PChar(Password);
user_sec_data1.dba_user_name := 'sysdba';
user_sec_data1.dba_password := 'masterkey';
user_sec_data1.sec_flags := sec_password_spec or sec_server_spec or
sec_dba_user_name_spec or sec_dba_password_spec;
isc_add_user(p_status, @user_sec_data1);
end;
Deze procedure gaat alleen goed als het paswoord niet langer is dan 7 karakters.
Waarom? En is er een andere (betere) manier om users aan Interbase toe te voegen?
JackBigMac.
Bookmarks