Problem retriving Binary Data from a Clipper Character field 
Author Message
 Problem retriving Binary Data from a Clipper Character field

Hi all,

A easy one.

I have a large and stable aplication in Clipper-DOS. I want to make a
windows aplication in delphi using Apollo to retrieve data from the DOS
aplication.

The trouble here is that I have real numbers stored in the DBF's in
IEEE-Floating Point format that only takes 8 bytes to store a very big real
number (instead of 15 to 20 bytes requiered in a normal 'Numeric' field) in
to a character field. These character fields holds binary data.

For example, the number 1.0 is in IEEE:

  chr(0) + chr(0) + chr(0) + chr(0) + chr(0) + chr(0) + chr(240) + chr(63)

this fit prefectly in a character field with a size of 8 bytes

When I try to read these fields in Delphi,  I get only a empty string:  ''
It seems like the BDE stops to read the field when it find a #0 ( chr(0) )
byte and discards the rest.

I have try reading a PCHAR variable using TStringField.GetData and
DBiGetField (this is a BDE API function) without any success.

I'm lost.

Please help, any advise will be apreciated.

Teo Fonrouge
Olan de Mxico, S.A. de C.V.



Sun, 12 Sep 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Saving Binary Data to a Paradox Binary Field via Code

2. manual retrive dbf data

3. Storing binary data in blob Fields..

4. Needed help on writing large binary data to MSSQL6.5 image field

5. Binary data in text fields within MS-Access

6. binary data in char() field

7. Delphi, ADO, Access and binary data problem

8. Help: DBMemo in character-field (not Memo-field)

9. Using Apollo with Clipper Ntx data

10. Problem resizing a field in an existing Paradox data base

11. Apollo, Clipper Tables, and long fields

12. Delphi, Access, and Binary Data

 

 
Powered by phpBB® Forum Software