Solved

Alternative for "GetSetting" and "SaveSetting"

Posted on 2004-10-01
3
662 Views
Last Modified: 2012-05-07
Hi

      I am using VB6. How can we store some data with in our application without writing it either to registry or to any external file?Presently i am using  "GetSetting" and "SaveSetting"
functions. Is there any alternative method to do the same. my need is to store some secure strings safely within the application, also while running the application i need to modify the string and update it safely back.
Thanks in Advance
Riyasjef
0
Comment
Question by:riyasjef
3 Comments
 

Assisted Solution

by:reapesuk
reapesuk earned 100 total points
ID: 12203056
I actually don't know of any way of storing and modifying data that would be still available once your program has terminated.

Obviously, you can store CONSTANT values by using CONST sValue as string ="my settings"

But you cannot write to a CONSTANT.

Why, can't you save the settings to an ini file for example in your programs install directory and encrypt the data? This way the settings are secure.

Jim
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 300 total points
ID: 12203075
You can store the values in your EXE either as hardcoded values or as part of a resource file, but then you won't be able to modify them.

If you need the strings to be "secure" then you can encrypt them before writing them to the registry or to a file.  You can use something like MD5:

http://www.freevbcode.com/ShowCode.asp?ID=3779

~IM
0
 
LVL 32

Assisted Solution

by:Erick37
Erick37 earned 100 total points
ID: 12203418
Although it is *possible* to store data at the end of your executable file it is not a good idea.  If you ever do an upgrade or version change all of the data will be erased.  You would need to encrypt it anyway to secure the information.

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA open file from excel cell 4 42
using Access 8 69
VBA Shell can't Find Word document 11 95
VB 6 error 5 in windows 10 but not in XP 7 57
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question