> Date: Tue, 19 Aug 2008 21:09:07 +0100
> From: "Stevio" <[EMAIL PROTECTED]>
> Subject: Creating a user from within Delphi
> To: "Delphi DB" <[email protected]>
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>       reply-type=original
>
> I have developed an application (Delphi 5 Pro) that connects to a Firebird 
> database using the standard sysdba username and password and at present this 
> is hardcoded in my application. I want to change this and have a specific 
> user set up for my application and database.
>
> However, when I deploy my application (for example if I make it available 
> for download from my web site), the user will need to install my application 
> and install Firebird. How can I then create the new specific Firebird user 
> that my application needs in order to access the database?
>
> I do not want to continue using sysdba because if they change the default 
> password for sysdba (which they should do really), then they will not be 
> able to use my application since the sysdba username and password are 
> hardcoded in my application.
>
> Thanks,
> Stephen 
>   
Stephen,
Your solution is quite easy.
First make a form that prompts for username and password
It could also prompt for database name, particularly if your users use 
aliases.conf (recommended)

Remove your hard coded username, password and db name
and replace the values with the values from your form.

Then open your database.
On one of these lists I posted a utility that encrypts these values 
(very simple encryption) and can store the encrypted username, password 
and db name in registry or an ini file. When my programs start they look 
for these details for this user and if available attempt to open the db 
with those credentials else they bring up the prompt form.

In addition a dba can save the settings to a file on USB key and for 
each authorised user use the data on the key to set them up.

Mick
_______________________________________________
Delphi-DB mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db

Reply via email to