|
-
August 17th, 2009, 03:12 AM
#1
application settings/properties
Hi,
I have a old vb6 application I maintain,
that has the settings in a separate xml file.
But now I have to move those "inside" (to remove the xml, don't ask why ).
What would be best place/"paradigm" for such
settings to be handled in vb6 ?
Like database connections, general parameters...
Also to be easy to change it, u know what I mean.
I just searched on the web but until now could not find it.
Of course it is easy to hard code the ones for the moment
but maybe is a better way.
Regards,
a
-
August 17th, 2009, 07:02 AM
#2
Re: application settings/properties
In VB6 most of these kinds of settings would be placed in an .ini file or in the registry. You could equally store them in a resource file. Part of how you would do this can depend also on the application i.e. is it a stand alone app is it a 'layered' app with seperate components residing on different physical boxes.
If you find my answers helpful, dont forget to rate me 
-
August 17th, 2009, 07:17 AM
#3
Re: application settings/properties
The XML File is not a lot different from an INI file (as you probably have discovered)
I guess one reason you are being asked to move the settings from the XML is because an XML file can easily be read (which may compromise various security issues)
Can I suggest that moving the settings either into a database table or into the registry may create its own set of issues, but is certainly a real alternative to XML
However, have you considered leaving the data in the XML file and simply encrypting the file once the settings are made. Then all your program has to do is decrypt the file and away you go
This will solve the security issue if thats what this is all about
Search the forum on Encryption as this topic has been discussed at length, not too long ago
-
August 17th, 2009, 07:28 AM
#4
Re: application settings/properties
Actually the reasons for stop using the xml is pretty stupid:
it is a big old application using lots of not supported 3d party dlls and not only dlls;
there is a setup that does include the xml when run/installed, but of course the old xml.
If I now add a new database connection in application and xml the xml will not be copied at new
release and if 500 users get the new version of exe automatically they ain't going to get the new
xml.
And I cannot make the same setup because I have no idea of all the entities related, I tried but
just didn't guessed it right.
So I want to move the setting "inside" sort to speak and then at new release it will come
together with the executable.
I think best for my application is to put it in registry. Why not in a table?
Because the user can connect to different databases, depending on the default one (from xml
for now) it initial connects to that and then he can choose other dbs.
Thanks guys.
-
August 17th, 2009, 08:06 AM
#5
Re: application settings/properties
I normally just use an ini file which is created at the first run of the software on the users pc using default values contained within the exe.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|