|
|
Heaser of a file.dbf
He at all,
I know that it is possible to change throught a pure clipper language
program some thing into the header of a file DBF.
For exemple the first bit that can be 03 or 83 or another depending if there
is a DBT file or not and (I think) if it is maked with a dbfMDX driver o
dbfCDX or others
My question is if I want to change the first bit from 03 to 83 or viceversa
knowing that the header is in hexadecimal and knowing that clipper do not
support exasecimals number how can I do?
Thank
P.Pietro
|
|
0
|
|
|
|
Reply
|
NOSPAM4494 (11)
|
8/4/2004 12:58:28 PM |
|
* A.M. <NOSPAM@eurotime.it>:
> My question is if I want to change the first bit from 03 to 83 or
> viceversa knowing that the header is in hexadecimal and knowing that
> clipper do not support exasecimals number how can I do?
One obvious solution it to find the nearest hex to decimal converter to
hand, do the conversion and then use the decimal value in your code.
--
Dave Pearson | OSLib - Timeslice release functions.
http://www.davep.org/ | eg - Norton Guide reader for Linux.
http://www.davep.org/clipper/ | weg - Norton Guide reader for Windows.
http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
|
|
0
|
|
|
|
Reply
|
davep.news (1011)
|
8/4/2004 1:07:26 PM
|
|
A.M. wrote:
> He at all,
> I know that it is possible to change throught a pure clipper language
> program some thing into the header of a file DBF.
> For exemple the first bit that can be 03 or 83 or another depending if there
> is a DBT file or not and (I think) if it is maked with a dbfMDX driver o
> dbfCDX or others
>
> My question is if I want to change the first bit from 03 to 83 or viceversa
> knowing that the header is in hexadecimal and knowing that clipper do not
> support exasecimals number how can I do?
> Thank
> P.Pietro
Don't you have a Clipper language reference? If not, get one.
First you are talking about a byte, not a bit. 03 has value 3 and 83
has value 131.
fh := fopen("a.dbf", 2) && open a binary file for read/write
cB := chr(131) && this is your 83 hex to 131 dec to chr
fwrite(fh, cB, 1)
fclose(fh)
I haven't actually tried this, but it should work. :-)
--
Joe Wright mailto:joewwright@comcast.net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
|
|
0
|
|
|
|
Reply
|
joewwright (1737)
|
8/4/2004 11:17:02 PM
|
|
|
2 Replies
37 Views
(page loaded in 0.08 seconds)
|
|
|
|
|
|
|
|
|