ini Files or Registry

  • Thread starter Thread starter Neil Steventon
  • Start date Start date
N

Neil Steventon

Hi,

Just wanted to clarify , if I set up an application that requires the
connection for a sql database to setup by the user supplying the username
and password to connect, would it be best to save this info to the registry
or use an ini file.

I just wondered if there are any whitepapers or other source of infomation
on saving application setting such as these.

Thank alot

Neil
 
afaik, ini-files are outdated...
Use registry or an xml file
Don't know which one would be best... maybe xml ... considering
system-privileges

greetz
 
Neil Steventon said:
Hi,

Just wanted to clarify , if I set up an application that requires the
connection for a sql database to setup by the user supplying the username
and password to connect, would it be best to save this info to the registry
or use an ini file.

I just wondered if there are any whitepapers or other source of infomation
on saving application setting such as these.

Thank alot

Neil

If you program is running on a single PC, then the registry would be Ok, but
if you application might be used on a network. Placed on a Shared drive that
severeal people have access to from multiple PC's, then a INI-file, XML or
any other type of file would be better, since that file would be with the
application.

Maybe progamming you applicaton so that you can supply an argument to where
the file is located would be even better. That way the Application could be
placed on a Public shared drive, and the Ini-file could then be located on
the User's Personal Drive.

Example:

'P is a public shared drive
P:\Myapp\app.exe

'H is the user's personal drive
H:\

'start argument
P:\Myapp\app.exe "H:\myfile.ini"

btw: Eudora uses this way of allowing the user to specify where to look for
the mail-box
 
In addition, you can use the Special System folders to store data that roams
accross the network along with the user profile.

See "Environment.GetFolderPath" and "ApplicationData" in the help files to
see how to get the path to this folder.

HTH,

Trev.
 
Back
Top