ADIR() Size vs Calculated Size 
Author Message
 ADIR() Size vs Calculated Size

I've noticed that some of my dbf's have discrepancies in their byte sizes.
Method #1 = use ADIR function
Method #2 = (RECSIZE()*LASTREC())+HEADER()+1
Mostly there is no difference, sometimes the difference is only 1 byte,
but sometimes the difference is over a 100 bytes.
Typical files have 5000 records and recsize()=150.
Summer '87, Blinker 5.0, W95/W98, peer to peer netwoking.
On occasion, the files are opened with dBase III+, too.

I think the discrepancy appears after adding records.
I'm also having sporadic problems with duplicated records.
Might these be related? Suggestions?

Fred Zuckerman
San Diego, CA, USA



Tue, 29 Apr 2003 03:00:00 GMT  
 ADIR() Size vs Calculated Size

Quote:
>I've noticed that some of my dbf's have discrepancies in their byte sizes.

Maybe you need to prove which method is correct and which is not.

Quote:
>Method #1 = use ADIR function

Does the DOS dir command give the same results

Quote:
>Method #2 = (RECSIZE()*LASTREC())+HEADER()+1

How about comparing the

  1. value immediately after opening the .dbf
  2. value after making changes to the .dbf

Remember that your database may be in transit at the time your
checking it's size.

Quote:
>Mostly there is no difference, sometimes the difference is only 1 byte,
>but sometimes the difference is over a 100 bytes.
>Typical files have 5000 records and recsize()=150.
>Summer '87, Blinker 5.0, W95/W98, peer to peer netwoking.
>On occasion, the files are opened with dBase III+, too.

If anyone opens your .dbf with another product (Access, dBASE, etc)
then you are running the risk of messing up your .dbf and/or it's
index file(s).  Passive viewing of the file would be ok, but there
may be no quarantee that the person won't rewrite the data and thereby
messing it up.

Quote:

>I think the discrepancy appears after adding records.
>I'm also having sporadic problems with duplicated records.
>Might these be related? Suggestions?

>Fred Zuckerman
>San Diego, CA, USA

BTW: What version of Clipper and what revision are you using.


Wed, 30 Apr 2003 03:00:00 GMT  
 ADIR() Size vs Calculated Size
Quote:

>BTW: What version of Clipper and what revision are you using.

Oops. Forgot to mention. S'87, Blinker5.0, W95/98 peer networking


Wed, 30 Apr 2003 03:00:00 GMT  
 ADIR() Size vs Calculated Size
I'm sending you a file in a seperate message that lists
Clipper S'87 anomalies that talk about filesize. See
the section on "COMMIT Resizes DBF" Maybe it will shed light
on the filesize differences.


Quote:

>>BTW: What version of Clipper and what revision are you using.

>Oops. Forgot to mention. S'87, Blinker5.0, W95/98 peer networking



Wed, 30 Apr 2003 03:00:00 GMT  
 ADIR() Size vs Calculated Size
For what it's worth, Clipper adds one byte to the standard dBASE III
header, a 0 after the 0D at the end of the field list.  I've never
figured out why Clipper does this or what the byte might be used for but
you will find that header() returns (fcount()+1)*32+1 for dBASE III and
(fcount()+1)*32+2 for Clipper .dbf's.  And of course there is always the
useless 1A appended to the .dbf.

Joe



Thu, 01 May 2003 03:00:00 GMT  
 ADIR() Size vs Calculated Size
On Sun, 12 Nov 2000 16:46:00 GMT, Joe Wright

Quote:

>For what it's worth, Clipper adds one byte to the standard dBASE III
>header, a 0 after the 0D at the end of the field list.  I've never
>figured out why Clipper does this or what the byte might be used for but
>you will find that header() returns (fcount()+1)*32+1 for dBASE III and
>(fcount()+1)*32+2 for Clipper .dbf's.  And of course there is always the
>useless 1A appended to the .dbf.

It seems like I remember something about the 1A being used for dBASE
III era .dbf's, but not Clipper .dbf's.
Quote:

>Joe



Thu, 01 May 2003 03:00:00 GMT  
 ADIR() Size vs Calculated Size
If you run Norton Utilities(dos) filefix you will discover that some records
have delete marker corrupted when you delete and/or
append reccords to the same file with clipper and dbase III.
Regards
Alexis Gaitanis


Quote:
>I've noticed that some of my dbf's have discrepancies in their byte sizes.
>Method #1 = use ADIR function
>Method #2 = (RECSIZE()*LASTREC())+HEADER()+1
>Mostly there is no difference, sometimes the difference is only 1 byte,
>but sometimes the difference is over a 100 bytes.
>Typical files have 5000 records and recsize()=150.
>Summer '87, Blinker 5.0, W95/W98, peer to peer netwoking.
>On occasion, the files are opened with dBase III+, too.

>I think the discrepancy appears after adding records.
>I'm also having sporadic problems with duplicated records.
>Might these be related? Suggestions?

>Fred Zuckerman
>San Diego, CA, USA



Sat, 10 May 2003 03:00:00 GMT  
 ADIR() Size vs Calculated Size
My application is Clipper Summer '87 but sometimes when clients call me
with a problem I will walk them through the steps in dBaseIII+ (dot prompt)
to get their errors repaired. Would it help if I'm careful to pack in clipper
before I open dBaseIII+ and then to pack in dBaseIII+ before exiting and
letting them continue in the clipper application?
Thanks,
Fred
Quote:

>If you run Norton Utilities(dos) filefix you will discover that some records
>have delete marker corrupted when you delete and/or
>append reccords to the same file with clipper and dbase III.
>Regards
>Alexis Gaitanis



Sun, 11 May 2003 03:00:00 GMT  
 ADIR() Size vs Calculated Size
Hi Fred,


Quote:
>My application is Clipper Summer '87 but sometimes when clients call me
>with a problem I will walk them through the steps in dBaseIII+ (dot prompt)
>to get their errors repaired. Would it help if I'm careful to pack in clipper
>before I open dBaseIII+ and then to pack in dBaseIII+ before exiting and
>letting them continue in the clipper application?
>Thanks,
>Fred

Do not use Dbase3+ under any circumstances with your Summer87 dbfs
unless you love having more problems. DBase 3+ adds Control Z's to the
end of the dbf and also handles the Year 2000 dates differently.
You also should have applied the Y2KFix  and LUpdate fix on the Oasis
to your S87source and recompile.

If you are going to allow your clients to modify your dbfs etc, then
you would be better supplying them with dbu.exe (Updated to Y2K
standard).

Personally I would be STRONGLY discouraging the clients from touching
their files in any way. It would be better to either provide the tools
within your program or fix them remotely using a shareware program
called Telereplica (DOS), which works in a similar manner to Pcremote
etc.
With this program and a 33.6kb/s modem would be quite adequate to
control the remote pc and do the appropriate fixes yourself. The
author has defined a simple procedure to allow the client to call you
and then pass control to you.

Regards Ray Manning
Melbourne, Australia

Quote:

>>If you run Norton Utilities(dos) filefix you will discover that some records
>>have delete marker corrupted when you delete and/or
>>append reccords to the same file with clipper and dbase III.
>>Regards
>>Alexis Gaitanis



Mon, 12 May 2003 08:58:33 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. ANS Forth: Cell Size vs. Address Size

2. Direct Access Record Size vs. Disk Sector Size

3. size of libtk.a vs size of wishx

4. Calculating Field Sizes

5. how to calculate the size of a filed in fractions of an inch

6. how to calculate segment size?

7. calculating the size of an array passed to a function

8. how to calculate the size of sys.stdin?

9. How to Calculate Stack Size Requirements?

10. File Size, Volume Size

11. Maximum size of unnamed pipe size in ruby

12. Video ram size and system ram size

 

 
Powered by phpBB® Forum Software