I.T. Discussion Community!
-Collapse +Expand
C++
Search C++ Group:

Advanced
-Collapse +Expand C++ To/From
To/FromCODEGuides
-Collapse +Expand C++ Study Test
PRESTWOODCERTIFIED
-Collapse +Expand C++ Store
PRESTWOODSTORE

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingC++   Print This     
 
C++:
Three Reasons I Like to Use Text Files to Store Data in My Software Applications
 
Posted 7 months ago on 9/4/2018
Take Away:

This article discusses three reasons I like to use fixed width text files in my C, C++ and C# application programs.

KB102848



Many software applications use a variety of data file formats to store data for the program’s use. There is an array for data storage options including Microsoft Access, Foxpro, text files, various database engines, etc. It is at the discretion the programmer. Here I will discuss the three reasons I prefer to use fixed width text files to store data for my custom software.

The first is reliability. I think fixed width text files are more reliable and less likely to get seriously corrupted. I have seen mass market programs malfunction and shut down due to database engine “hick ups”, corruption and other snafus. Personally, I think these other data file formats are so complex that they become more prone to defects and corruption. That is the last thing business people need when time and money are on the line.

And this leads to the second reason I prefer fixed width text files. When they do become corrupted, they are much easier to repair than other data file formats. Quite often, it as simple as bringing up the text file in Microsoft Notepad and looking for garbage characters and whatnot and manually removing them so all the records in the fixed width text file become homogenous and viable so the application software can work with it. Other times, I may need to create a small utility program in C, C++ or C# that will manipulate the text file into a rejuvenated format so it will become useable again. With other data file formats, it is seldom this simple or quick. You tend to become more dependent on outside software utilities or far away consultants and it just ends up costing too much time and money – a “no no” for business people.

The third and final reason is that fixed width text files can be easily ported over to a new vertical market software application. As a real life example, I recently redesigned an old MS-DOS program I created in C way back in 1996. The customer had used this program successfully since that time and the program used fixed width text files. In the C# application I created for them, I created data import programming code to access all the data from the text files of the old program and convert it to text files for the new program. This encompassed customers, vendors, chart of accounts, receivables, payables, invoice and back ordered invoices. It worked quickly and easily, because I never had to deal with complex, squirrely data file formats.

So there you have it. My programming peers may say I am “outdated” or “not with it” or whatever criticism they choose to heap on me for using text files. But the bottom line is that I know from experience that fixed width text files are going to make it easier for me to repair and export data from. And they are simply more reliable for customers who depend on them to run the application software they use for their businesses.


Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1196A1
Enter key:
Article Contributed By Douglas.M:

Please visit my software developer website for more information about my services. I offer application development as well as Android app coding services. My developer skills are best suited to dealing with custom software projects. I can perform programming for Corel Paradox as well as C# Sharp and PHP.

In my local area of northeast Ohio, I can cater to computer repair and "fix my computer" issues.

Use my contact web page today to reach me about any software design ideas you have.

Visit Profile

 KB Article #102848 Counter
460
Since 9/4/2018
-
   Contact Us!
 
PrestwoodBoards.com was developed and is maintainted by me. Do you have a question or suggestion? Do you see a problem? Contact me now. My goal is to build an ad-free and spam-free source of I.T. information with many contributers (ok to promote your website/company in your bio). Yes, my company Prestwood IT Solutions is mentioned in my bio which shows with every post, but you can contribute and promote your pet project too!

1,472 People Online Now!!  
Sign In to see who's online now!  Not a member? Join now. It's free!
Show more stats...


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech