Btrieve saves data exactly as it's sent to Btrieve to be stored. If this field has an index, you can see what the developer had in mind in terms of data type.
I'm not familiar with Btrieve..
I try to describe the problem more exactly.
I know that, for example, the number 0.5
is saved as chain of six bytes: 80|00|00|00|00|00 (hex),
number 1.5 as 81|00|00|00|00|40,
2.0 as 82|00|00|00|00|00.
Do you know how were they encoded?
Piotr
I have not seen that type of encoding. Your best option would be to go to the vendor of the application and ask them what the encoding is. Failing that, you could also look in the application source code to find the encoding.
Remember, the application is encoding the data, not Btrieve/Pervasive.
Btrieve saves numbers, dates and times in binary format. The developer can use one of the standard Btrieve data types or since Btrieve can contain any type of data they can also use non-standard binary types. If you need to try and analzye the structure you can take a look at BtSearch at
It helps you analyze the btrieve structure and creates the DDF files. It supports the Btrieve binary types as well as some of the other common ones used in Btrieve files.
*** Pervasive.SQL Service & Support Classes ***
Chicago: August, 2004: See our web site for details!
APP - Accessing 6-Byte Floating Point Values
Application: Any Old App
Version: PSQL2000
Issue: (NG)
I've got an application which uses an old Pascal Data type which is a 6-byte float. Any ideas how this information is stored?
Resolution:
The old Turbo Pascal "Real" type is a 6-byte floating point quantity. The format is
MSB LSB
SFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF EEEEEEEE
S : sign
F : mantissa (implicit leading "1" bit)
E : exponent
if 0 < E <= 255 then Value = (-1)^S * 2^(E -129) * (1.F)
if E = 0 then Value = 0
[From Doug Reilly]
I have some C source (below) that I think will interpret it if this is for TrustMark data files.
They used some old Turbo Pascal, I think. I worked with Nations Bank on this some time ago, and my BTVIEWER actually supports that type, using the old Smithware code for 6 byte float.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.