473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What's Better??

I got a Structure that handles all the Data for my DB Connections like, type
of database, usernames, servers,etc and i was wondering what was the best
approach to save that data.
What is the better approach of the 2 followings:
1- Use serialization and just reload the object every time the application
reloads.
2- Use a class to access INI files , write all the propertys there and then
encrypt the file.

Thanks.
Alex.
Nov 20 '05 #1
4 1606
Take a look at the .Config files. they are written in XML so you can port
them over to other OS's and they are easy to edit and manipulate
"Ale K." <_N******@AleK.com> wrote in message
news:uI**************@TK2MSFTNGP11.phx.gbl...
I got a Structure that handles all the Data for my DB Connections like, type of database, usernames, servers,etc and i was wondering what was the best
approach to save that data.
What is the better approach of the 2 followings:
1- Use serialization and just reload the object every time the application
reloads.
2- Use a class to access INI files , write all the propertys there and then encrypt the file.

Thanks.
Alex.

Nov 20 '05 #2
Hello,

"Ale K." <_N******@AleK.com> schrieb:
I got a Structure that handles all the Data for my DB Connections
like, type of database, usernames, servers,etc and i was wondering
what was the best approach to save that data.
What is the better approach of the 2 followings:
1- Use serialization and just reload the object every time the
application reloads.
2- Use a class to access INI files , write all the propertys there
and then encrypt the file.


Why encrypt the file?!

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3
why to encrypt the password? because the file is handling username and pass
for the DB...
but again my question is.... Serialize the Structure that contains all this
data, or get it into a INI or XML file and save it??
i was thinking that serializing the object will be faster.. but i wasn't
sure

Thanks.
Alex.

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl...
Hello,

"Ale K." <_N******@AleK.com> schrieb:
I got a Structure that handles all the Data for my DB Connections
like, type of database, usernames, servers,etc and i was wondering
what was the best approach to save that data.
What is the better approach of the 2 followings:
1- Use serialization and just reload the object every time the
application reloads.
2- Use a class to access INI files , write all the propertys there
and then encrypt the file.


Why encrypt the file?!

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #4
Hello,

"Ale K." <_N******@AleK.com> schrieb:
why to encrypt the password? because the file is handling
username and pass for the DB...
I would encrypt the data before writing it to the file.
but again my question is.... Serialize the Structure that contains all this data, or get it into a INI or XML file and save it??


If you want to save "user preferences", you can use a XML files. You fill
find a libarary for saving/reading settings here (implemented in C#):

http://www.palmbytes.de/content/dotn...optionslib.htm

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
9
by: ForHimself Every Man | last post by:
What's better about Rattlesnakes than Python. I'm sure there's something. What is it? This is not a troll. I'm a snake shooping and I want people's answers. I don't know beans about...
5
by: Vasileios Zografos | last post by:
Ok, easy question. Not caring about the variable scope what is better (i.e. possibly in memory allocation etc) int someVar=0; for (int i=0;i<1000;i++) { ...
7
by: Bura Tino | last post by:
Hi, Going forward, what's better to use <td height="20"> or <td style="height:20;">
1
by: Arjen | last post by:
Hi, Sometimes I see this: (string)DataBinder.Eval(Container.DataItem, "Answer") And sometimes this: Eval(Container.DataItem, "Answer") What is better (faster/performance) when publishing...
2
by: samcomm | last post by:
Hello All.. I'm a student and studing C++. Could you tell me what can I develop in C++? I konw that C++ can develop almost programs. Just I want to know....
6
by: mistral | last post by:
what encoding better to select when paste javascript or php code into windows Notepad and 'Save as'? ANSI, Unicode, Unicode big endian, UTF-8 ? m.
58
by: LuisC | last post by:
What is better for holding small numbers in a program? I know that char uses less memory, but, with 32 or 64 bits systems, there are advantages (such as processing time) in using int instead of...
7
by: Rolf Mander | last post by:
What performs better, theoreticaly? This <? echo date("d",time()); echo date("m",time()); echo date("Y",time()); ?> Or that? <? $time = time();
6
by: ManicQin | last post by:
Let's ignore for a minute design decisions , readability and any other of those parameters , In the most raw form of c++ (purely efficiency if you want) what is better, bloating up a classes or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.