14 Replies - 1119 Views - Last Post: 25 January 2014 - 12:30 PM Rate Topic: -----

#1 KFredje  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 131
  • Joined: 06-September 11

converting 23 year old database

Posted 02 December 2013 - 08:55 AM

Hello

A friend and I are working on a little project for my dad. He has a 23 year old MS DOS application for customer and product managing. Now he asked us to make a new program that will work on Windows 7 and later. This is no problem for us to write a working application but converting the database is another story.

The files that I assume are database files are .FIC and .NDX files. I did some search on Google and downloaded some programs but when I try to open (after renaming the .FIC files to .DBF files) those programs tell me the header of the file is corrupt. Nevertheless, the files still work in my dads application.

Since I can't attach those files I'll add some code of them here:
This is a part from the .FIC file.
TIVAPTIVAPAN N.V.            051 304932  051 312635  ambachtenstraat,68      8870 izegem               }1E                                                                                                                                                                                              SEGHESEGHERS N.V.            03/7710134              kapelanielaan,12        9140 temse                8èÆG                                                                                                                                                                                              

This is some code from the .NDX file with the same name as the file above.
É       A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              zßò¸8dúP»êó~ó€úóðó‚Bóúóöó†Àóú;²¥u²ÿ½Šäœáú׎óúP¸î:’Óü.Óü»åð
9ø¸sÿ5þ»–¨ò»šúž®ßú –óöƒ>`×é†â†×ìü~
ô…ßþXÿ¸ P3Àkù¸„üPüðRÇ_úÚÿ³våñMç†çüǺêKíöàÿ»WnàøépÿgüÆîùÖæ¦Ì±öSY¿3ýûò5äý‹~‹ñBR¼øøD켻ɡ¶=é÷nMíÜø	
Üø	»­ZÜø¸øÈÜüîÜø	¸ø
¼Üø	á§mÿÙHΣ¤‡Ïo@ÎéO‹¦žøºÕ žøÝþŸø
Ýø¡Þé„aû¡¡;ù}¥ñÿŠÿÌ‹v+ÎKΓ£Œ¨ã°øºÍ×%¿ºª/æÎðCΙþ൮óðÝø
ùßv÷äTÊXé±ÏPõlPShþF£®ß­s»º°TØ
º´"Ø	¸"Ý,ÃÕöÒÁ£¶‡º:Ó ðü¼ëÚ^ôßBF“ºNÚº¾¥ÿâÛöcÑóèâù»‡Ò;äø´ô¸‰U’ïø
kU“‹G5Ó»"÷çýšø¦Ë‡á7¡R;õ|‡ é ¡ø£ñÏý gñ                              †  0                          %  ALLRE

As you can see, some parts of the files are readable and some parts are not. There is also no set amount of spaces between what should be columns. For example the code from the .FIC file:
Company: TIVAPTIVAPAN N.V.
Phone 1: 051 304932
Phone 2: 051 312635
Street: ambachtenstraat,68
City: 8870 izegem
BTW-number: }1E <- don't know what it's called in English but should be a 8 digit number.

Can someone lead me in a right direction so I can look there or is it almost impossible to retrieve all the data from these old databases? Contacting the original writer of the program is impossible since he passed away a year ago.

EDIT: What I also noticed is that some characters that I see in notepad are not copied to this post example.

This post has been edited by KFredje: 02 December 2013 - 08:56 AM


Is This A Good Question/Topic? 0
  • +

Replies To: converting 23 year old database

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9574
  • View blog
  • Posts: 36,273
  • Joined: 12-June 08

Re: converting 23 year old database

Posted 02 December 2013 - 09:00 AM

There's no export of data? Nothing to a CSV, text, or what not?

I mean - if your FIC is the actual data it appears to be tab delimited.. so it shouldn't be that hard to do an import into an actual DB (well.. once you set up the tables).
Was This Post Helpful? 0
  • +
  • -

#3 KFredje  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 131
  • Joined: 06-September 11

Re: converting 23 year old database

Posted 02 December 2013 - 10:46 AM

View Postmodi123_1, on 02 December 2013 - 09:00 AM, said:

There's no export of data? Nothing to a CSV, text, or what not?

I mean - if your FIC is the actual data it appears to be tab delimited.. so it shouldn't be that hard to do an import into an actual DB (well.. once you set up the tables).

It isn't that hard no, but the problem and confusing thing is that part of the file is readable (first columns) and a column that isn't readable (see example for the .FIC file). I'm wondering if there was a way to get that data extracted/translated to characters that make sense like a big number or words, not random characters or maybe even invisible characters.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9574
  • View blog
  • Posts: 36,273
  • Joined: 12-June 08

Re: converting 23 year old database

Posted 02 December 2013 - 10:52 AM

You are not making sense. In your post above you showed clear data with the ".FIC" file and garbled with the ".NDX". Is that not the case?

Also, let me re-ask my question, is there an export function to this existing program? There's no reason to try and hack through some file structure when you can get it in a more succinct format.
Was This Post Helpful? 0
  • +
  • -

#5 KFredje  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 131
  • Joined: 06-September 11

Re: converting 23 year old database

Posted 03 December 2013 - 09:27 AM

View Postmodi123_1, on 02 December 2013 - 10:52 AM, said:

Also, let me re-ask my question, is there an export function to this existing program? There's no reason to try and hack through some file structure when you can get it in a more succinct format.

Both the .FIC and .NDX files contain clear and scrambled up data. In the .FIC file, the addres and company name are clear, but the VAT number (in Belgium BTW) is encoded in the file.

View Postmodi123_1, on 02 December 2013 - 10:52 AM, said:

You are not making sense. In your post above you showed clear data with the ".FIC" file and garbled with the ".NDX". Is that not the case?

There is no way to export the data out of the existing program. So my only chance on converting the database is working with these files.
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9574
  • View blog
  • Posts: 36,273
  • Joined: 12-June 08

Re: converting 23 year old database

Posted 03 December 2013 - 09:35 AM

Then you are left with few options.. either make due with what you can salvage, print out everything and enter it in by hand, or hand off the files to someone who may have a better idea.

There is going to be no clear cut way to recommend a solution to a twenty-three year old database that may or may not follow any standard conventions (just because it has an extension doesn't mean it is that file type). You'll have to kludge through it. There is no easy solution to recommend over a forum outside of let someone more experience have access to the files.. it is a lot of intuitive knowledge that typically needs to be applied.
Was This Post Helpful? 0
  • +
  • -

#7 KFredje  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 131
  • Joined: 06-September 11

Re: converting 23 year old database

Posted 05 December 2013 - 04:33 AM

I have figured some stuff out by converting the text to bytes. It turns out that each field has a fixed length in bytes. Spare space in those fields are filled up with 'spaces'. The BTW (VAT) number of 9 characters is encrypted in a rather special way. Let say the number 413544355. (I read this from the application). This is translated to 5 bytes which are 24 125 49 69 157. Those 5 bytes are saying nothing at first but, there is some connection. I gonna line out some numbers here:
  • 0 0 0 0 129
  • 0 0 0 0 130
  • 0 0 0 64 130
  • 0 0 0 0 131
  • 0 0 0 32 131
  • 0 0 0 64 131
  • 0 0 0 96 131

This goes on for a while but when the 3rd (middle) byte is added to the calculation it makes no sense at all anymore. What you see here basically is, the 5th byte starts at 129 for the number 1. At 2 it is 130. At 4 it's 131. So every power of 2 causes this 5th byte to be raised. From the looks of it, the 4th byte is a scale between 0 en 128. If 1 number is between the 2 powers of 2, then 128/2 = 64. When there are 3, 128/4 = 32 and so on. When you go above 256 the rule changes entirely leaving me in the dark how to figure out this. Maybe someone has seen this before?
Was This Post Helpful? 0
  • +
  • -

#8 Minimalist  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 142
  • Joined: 13-November 13

Re: converting 23 year old database

Posted 05 December 2013 - 07:35 AM

.NDX files are old dbase files. check out the following links:
http://www.fileinfo.com/extension/ndx
http://www.fileinfo.com/extension/fic
http://www.dbf2002.com/dbf-converter/
Was This Post Helpful? 0
  • +
  • -

#9 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5395
  • View blog
  • Posts: 27,389
  • Joined: 10-May 07

Re: converting 23 year old database

Posted 05 December 2013 - 07:39 AM

View Postmodi123_1, on 02 December 2013 - 11:00 AM, said:

There's no export of data? Nothing to a CSV, text, or what not?

I would write something into the old ms-dos application to just dump it to csv. That's assuming that they wrote the old app. If not, what is the application called? Is there something open source? Freeware? Renegade developer that posted the source code?
Was This Post Helpful? 0
  • +
  • -

#10 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: converting 23 year old database

Posted 05 December 2013 - 12:24 PM

Could it be that the number is an int/uint?
Was This Post Helpful? 0
  • +
  • -

#11 KFredje  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 131
  • Joined: 06-September 11

Re: converting 23 year old database

Posted 06 December 2013 - 01:42 PM

View PostMinimalist, on 05 December 2013 - 07:35 AM, said:


I already searched for solutions, but the header file is corrupt if I try to open them in a DB manager so can't do anything with them.

View Postno2pencil, on 05 December 2013 - 07:39 AM, said:

View Postmodi123_1, on 02 December 2013 - 11:00 AM, said:

There's no export of data? Nothing to a CSV, text, or what not?

I would write something into the old ms-dos application to just dump it to csv. That's assuming that they wrote the old app. If not, what is the application called? Is there something open source? Freeware? Renegade developer that posted the source code?

The person writing the application has died so there isn't any source code anymore. Also I'm not an expert in old coding. Also, it was a program designed for my dad, so don't think there is anything. Name of application was Pacapim.

View Postsnoj, on 05 December 2013 - 12:24 PM, said:

Could it be that the number is an int/uint?

The number is an int as far as I know. An example is 453541511. Does it matter what it is?

This post has been edited by KFredje: 06 December 2013 - 01:43 PM

Was This Post Helpful? 0
  • +
  • -

#12 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 498
  • View blog
  • Posts: 3,317
  • Joined: 12-January 10

Re: converting 23 year old database

Posted 06 December 2013 - 02:32 PM

View PostKFredje, on 06 December 2013 - 04:42 PM, said:

View PostMinimalist, on 05 December 2013 - 07:35 AM, said:


I already searched for solutions, but the header file is corrupt if I try to open them in a DB manager so can't do anything with them.

View Postno2pencil, on 05 December 2013 - 07:39 AM, said:

View Postmodi123_1, on 02 December 2013 - 11:00 AM, said:

There's no export of data? Nothing to a CSV, text, or what not?

I would write something into the old ms-dos application to just dump it to csv. That's assuming that they wrote the old app. If not, what is the application called? Is there something open source? Freeware? Renegade developer that posted the source code?

The person writing the application has died so there isn't any source code anymore. Also I'm not an expert in old coding. Also, it was a program designed for my dad, so don't think there is anything. Name of application was Pacapim.

View Postsnoj, on 05 December 2013 - 12:24 PM, said:

Could it be that the number is an int/uint?

The number is an int as far as I know. An example is 453541511. Does it matter what it is?



just out of curiousity but why do you want to move 23 years of junk data to as new platform? most companies only keep 7 or so years worth of data.

if it is corrupt only 1 thing to do-- start fresh and clean
Was This Post Helpful? 1
  • +
  • -

#13 Minimalist  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 142
  • Joined: 13-November 13

Re: converting 23 year old database

Posted 06 December 2013 - 02:44 PM

The haeder file can't be corrupted, otherwise you wouldn't be able to open it in the old application. Why don't you write your program, create a virtual disk and install dos on it (Free dos 1.1 you still can download). Your father puts all the new customers on your program and still can access the old database on a modern computer. Just a thought.
Was This Post Helpful? 1
  • +
  • -

#14 KFredje  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 131
  • Joined: 06-September 11

Re: converting 23 year old database

Posted 08 December 2013 - 03:01 AM

View PostMinimalist, on 06 December 2013 - 02:44 PM, said:

The haeder file can't be corrupted, otherwise you wouldn't be able to open it in the old application. Why don't you write your program, create a virtual disk and install dos on it (Free dos 1.1 you still can download). Your father puts all the new customers on your program and still can access the old database on a modern computer. Just a thought.

He want to keep his old data...stubborn man. Guess I'll just get the data that is easy to read, put it in a new Db and let him add the BTW (VAT) number by himself. Will save him work not to put every customer in it again and will save me work not figuring out how the number is encrypted.
Was This Post Helpful? 0
  • +
  • -

#15 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2069
  • View blog
  • Posts: 4,307
  • Joined: 11-December 07

Re: converting 23 year old database

Posted 25 January 2014 - 12:30 PM

I doubt he files are corrupt. If they work in your father's application, the evidence says they are just a non-standard format. It looks like you have two options:

1. Continue as you are doing: It looks like you are making headway in interpreting the files. I don't know how much more you have to go but if you think you are almost there then keep at it. If things get tough, just move the database files elsewhere so it thinks they are empty and write some data from the application. Knowingwhat the small amount of data is will help you interpret it.

2. Use the existing application: You say it doesn't have an export function. What about Saving individual records to a file? Is there logging? What is the output like? Have you tried redirecting stdout to a file? At the very worst, you can write a script to click "next" to display each record in turn and scrape the screen each time.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1