Board index » delphi » End user help with data files

End user help with data files

Please forgive me.  I know this is probably not the right place to ask
for help, but I'm not sure where to turn.  Any direction anyone can give
me would be appreciated.

I'm an end user (not a programmer) who inherited an OLD Turbo Pascal
compiled application.  The data file is not straight text, is about
230k, and is indexed.  Because of a power outage, I think the previous
user got the record pointer stuck at the end of the file, or the file
still open.  No backup exists.  The tools within the application to
"fix" a file don't work.  I get "access denied", or "file in use".

The program seems to work OK.  If we add a record, it appears to the
program as the only record.  But a browse of the data file shows that
other records exist.

What can I do?

P.S. It's a run-time application, and the original developer is unknown.

 

Re:End user help with data files


On Sat, 03 Mar 2001 10:11:43 -0600, Bob and Sherry

Quote
<Fishinbudd...@centurytel.net> wrote:
>Please forgive me.  I know this is probably not the right place to ask
>for help, but I'm not sure where to turn.  Any direction anyone can give
>me would be appreciated.

>I'm an end user (not a programmer) who inherited an OLD Turbo Pascal
>compiled application.  The data file is not straight text, is about
>230k, and is indexed.  Because of a power outage, I think the previous
>user got the record pointer stuck at the end of the file, or the file
>still open.  No backup exists.  The tools within the application to
>"fix" a file don't work.  I get "access denied", or "file in use".

>The program seems to work OK.  If we add a record, it appears to the
>program as the only record.  But a browse of the data file shows that
>other records exist.

>What can I do?

>P.S. It's a run-time application, and the original developer is unknown.

What it sounds like is the indexing has been corrupted (perhaps due to
the power outage) and no longer recognizes the original data in the
file.

Does the program offer any option for regenerating the index?  Do you
know if the index is stored in a separate file?  

If so then a possibility might be to delete (actually, just moving it
somewhere else temporarily is probably prudent) the index file.  The
lack of an index may force the program to recreate them.  

OTOH, depending on how the program was written, the lack of an index
may just hopelessly confuse it.

I'm afraid there's no other single/simple answer to your question
(other than give up and start over with a more up-to-date program).  

Without knowing how the program was written; what libraries may have
been used; the internal structure of the data file; it's hard to be
any more specific than that.  

Do you have access to the source code for the application?  Do you
know anything about the internal format of the data file?

Stephen Posey
slpo...@concentric.net

Re:End user help with data files


Quote
Stephen Posey wrote:
> On Sat, 03 Mar 2001 10:11:43 -0600, Bob and Sherry
> <Fishinbudd...@centurytel.net> wrote:

> >Please forgive me.  I know this is probably not the right place to ask
> >for help, but I'm not sure where to turn.  Any direction anyone can give
> >me would be appreciated.

> >I'm an end user (not a programmer) who inherited an OLD Turbo Pascal
> >compiled application.  The data file is not straight text, is about
> >230k, and is indexed.  Because of a power outage, I think the previous
> >user got the record pointer stuck at the end of the file, or the file
> >still open.  No backup exists.  The tools within the application to
> >"fix" a file don't work.  I get "access denied", or "file in use".

> >The program seems to work OK.  If we add a record, it appears to the
> >program as the only record.  But a browse of the data file shows that
> >other records exist.

> >What can I do?

> >P.S. It's a run-time application, and the original developer is unknown.

> What it sounds like is the indexing has been corrupted (perhaps due to
> the power outage) and no longer recognizes the original data in the
> file.

> Does the program offer any option for regenerating the index?  Do you
> know if the index is stored in a separate file?

> If so then a possibility might be to delete (actually, just moving it
> somewhere else temporarily is probably prudent) the index file.  The
> lack of an index may force the program to recreate them.

> OTOH, depending on how the program was written, the lack of an index
> may just hopelessly confuse it.

> I'm afraid there's no other single/simple answer to your question
> (other than give up and start over with a more up-to-date program).

> Without knowing how the program was written; what libraries may have
> been used; the internal structure of the data file; it's hard to be
> any more specific than that.

> Do you have access to the source code for the application?  Do you
> know anything about the internal format of the data file?

> Stephen Posey
> slpo...@concentric.net

No source code, just the .CHN files and .COM files.   The internal file
format is a no-go either.  I can see the text portion of some data, and I
know the field names and field formats, but that's all.  There are enough
special characters and junk to know that's it's not something I want to
experiment with, without knowing more about it.

It looks like a newer version of the application (which uses a different
engine) and lots of retyping will probably be the answer.

Thanks much for the responses.  I appreciate the help I got here.

Re:End user help with data files


Quote
In article <3AA1528A.E9E01...@centurytel.net>, Bob and Sherry wrote:

>Stephen Posey wrote:

>> On Sat, 03 Mar 2001 10:11:43 -0600, Bob and Sherry
>> <Fishinbudd...@centurytel.net> wrote:

>> >Please forgive me.  I know this is probably not the right place to ask
>> >for help, but I'm not sure where to turn.  Any direction anyone can give
>> >me would be appreciated.

>> >I'm an end user (not a programmer) who inherited an OLD Turbo Pascal
>> >compiled application.  The data file is not straight text, is about
>> >230k, and is indexed.  Because of a power outage, I think the previous
>> >user got the record pointer stuck at the end of the file, or the file
>> >still open.  No backup exists.  The tools within the application to
>> >"fix" a file don't work.  I get "access denied", or "file in use".

>> >The program seems to work OK.  If we add a record, it appears to the
>> >program as the only record.  But a browse of the data file shows that
>> >other records exist.

>> >What can I do?

>> >P.S. It's a run-time application, and the original developer is unknown.

>> What it sounds like is the indexing has been corrupted (perhaps due to
>> the power outage) and no longer recognizes the original data in the
>> file.

>> Does the program offer any option for regenerating the index?  Do you
>> know if the index is stored in a separate file?

>> If so then a possibility might be to delete (actually, just moving it
>> somewhere else temporarily is probably prudent) the index file.  The
>> lack of an index may force the program to recreate them.

>> OTOH, depending on how the program was written, the lack of an index
>> may just hopelessly confuse it.

>> I'm afraid there's no other single/simple answer to your question
>> (other than give up and start over with a more up-to-date program).

>> Without knowing how the program was written; what libraries may have
>> been used; the internal structure of the data file; it's hard to be
>> any more specific than that.

>> Do you have access to the source code for the application?  Do you
>> know anything about the internal format of the data file?

>> Stephen Posey
>> slpo...@concentric.net

>No source code, just the .CHN files and .COM files.   The internal file
>format is a no-go either.  I can see the text portion of some data, and I
>know the field names and field formats, but that's all.  There are enough
>special characters and junk to know that's it's not something I want to
>experiment with, without knowing more about it.

>It looks like a newer version of the application (which uses a different
>engine) and lots of retyping will probably be the answer.

I'm afraid it is either rewriting or disassembling ;-)

Re:End user help with data files


Bob and Sherry <Fishinbudd...@centurytel.net> said the following:
Quote

>> Without knowing how the program was written; what libraries may have
>> been used; the internal structure of the data file; it's hard to be
>> any more specific than that.

>> Do you have access to the source code for the application?  Do you
>> know anything about the internal format of the data file?

>> Stephen Posey
>> slpo...@concentric.net

>No source code, just the .CHN files and .COM files.

.chn and .com sounds like it was written originally in TP3. Worth
looking to see if there is an obvious file that has been created
to show the program is in use (it'll probably have the same date
as the system crash) - remember to back up the directory first to
somewhere else on your hard disk in case you accidentally delete
something vital to the program. Note that such a file may be marked
with either/or/and the hidden and system attributes.

Perhaps if you post a directory listing someone may spot a file that
looks like a temporary file that the program uses to show it is already
opened.

Quote
>The internal file
>format is a no-go either.  I can see the text portion of some data, and I
>know the field names and field formats, but that's all.  There are enough
>special characters and junk to know that's it's not something I want to
>experiment with, without knowing more about it.

If you know the data formats and field formats it should be possible to
resurrect all the current data - the 'special characters and junk' are
likely due to the fact that the file is a file of record and each
dataset will be defined by the record (and, hopefully, the order of
filling in a new record will be the same as the dataset on disk).

Quote
>It looks like a newer version of the application (which uses a different
>engine) and lots of retyping will probably be the answer.

Possibly. Possibly not.

If there is a file that the program uses to show it is in use then
deleting it will probably get the program working again unless the
database is corrupted when it might be simply a case of reconstructing
the database to the format you already have - whether this is simple to
do or not depends on the format and whether there are indexing files to
the database as well.

--
Pedt

Most mushrooms are umbrella shaped as they grow in damp places

Re:End user help with data files


Quote
>===== Original Message From Bob and Sherry <Fishinbudd...@centurytel.net>
=====
>Please forgive me.  I know this is probably not the right place to ask
>for help, but I'm not sure where to turn.  Any direction anyone can give
>me would be appreciated.

>I'm an end user (not a programmer) who inherited an OLD Turbo Pascal
>compiled application.  The data file is not straight text, is about
>230k, and is indexed.  Because of a power outage, I think the previous
>user got the record pointer stuck at the end of the file, or the file
>still open.  No backup exists.  The tools within the application to
>"fix" a file don't work.  I get "access denied", or "file in use".

>The program seems to work OK.  If we add a record, it appears to the
>program as the only record.  But a browse of the data file shows that
>other records exist.

>What can I do?

>P.S. It's a run-time application, and the original developer is unknown.

Having seen all the other replies, I missed a (somewhat) "obvious" reply
about
the fact that you write that the data file is not straight text. Try
starting
the application without file, and create a new one with obvious data, ie
"AAAA...", "BBBB..." etc for strings and recognizable numbers (OK, hard to
do
with TP3 reals) and look at the resulting new file with something like Vern
Buerg's "LIST". It might give you some clues. If you're really completely
stuck, and the data is extremely important, I own a copy of IDA
<http://www.datarescue.com/> and could disassemble the executable for you -
I
have a disassembled copy of TP3 (somewhere..., don't know where...) which
would enable me/you to match your code to that of the TP3 RTL - provided
it's
the same version. (And don't expect me to do it for free!)

Mail me privately if there is any need, use "prino (at) bigfoot (dot) com"
and
make sure to include "HH:" anywhere in the subject line!

HTH,

Robert

--
Robert AH Prins
pr...@bigfoot.com - Please use _this_ address for email replies!

Re:End user help with data files


Bob and Sherry <Fishinbudd...@centurytel.net> wrote:

Quote
>No source code, just the .CHN files and .COM files.   The internal
>file format is a no-go either.  I can see the text portion of some
>data, and I know the field names and field formats, but that's all.
>There are enough special characters and junk to know that's it's not
>something I want to experiment with, without knowing more about it.

You might try writing a record with specified data, and trying to match
the data to the file output. This might give you enough information to
reconstruct the data in the file.

--
The Scarlet Manuka

Re:End user help with data files


Re:End user help with data files


 Thank you all very much for the responses.  I appreciate all the help I got
here, and the time you spent to look into my problem.

After several attempts at reading and rewriting the data, it didn't seem to
work right.  As I said, I'm not a real programmer, so my amateur knowledge got
me nowhere.   Bringing in consultants was more than the administrator wanted to
do.

We did find an old backup data file from a year ago that worked.  There weren't
too many changes, so I ended up spending a couple of days bringing it up to
date.

Thanks again.

Bob

Other Threads