Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Structure of a FPT-File

191 views
Skip to first unread message

Eckhard Sallermann

unread,
Oct 23, 2002, 5:48:38 AM10/23/02
to
Hi *,

does anyone have a structure-description of the FPT-Files ?

Ecki


Stephen Quinn

unread,
Oct 23, 2002, 7:05:56 AM10/23/02
to
Ecki

I posted a small breakdown of FPTs quite a while ago (2yrs?) - google should
have it by now.

Basicly if you look at the MEMO field of the DBF with a hex editor you'll
see a number
Eg 123 for record #1

In the memo (FPT) file
bytes 3 & 4 are the memoblock size (0000 0020) = 32

now we take the memoblock size (32) and multiply by the number we found in
the DBF (123) and get the offset into the memo where the data is stored for
that record.
Eg
32 * 123 = 3936

move to byte 3936 of the memo.
Now we have some bytes that describe the data here.
Bytes 1 - 4 describe the data type (1 = text)
Bytes 5 - 8 is the data length
Bytes 9 - data length is the data
data length +1 to memoblocksize multiple (ie 32/64/96/128) -1 padded with
chr(0) last bit is 175(AF)

So data of '123456789' will look like

0000 0001 0000 0009 3132 3334 3536 3738 3900 0000... AF
|DataType | Length | Data | padding
|EOD

That's about it - quite simple really<g>

--
HTH
Steve Quinn
http://www.tuxedo.org/~esr/faqs/smart-questions.html
'I want to move to Theory...Everything works in Theory'


Geoff Schaller

unread,
Oct 23, 2002, 7:09:50 AM10/23/02
to
Check out my paper on repairing DBF and Memo Files in XBase Languages. Its
attachment 3. And if you want other memo file formats, the references are
there for where I found these.

Its on KnowVO.
(...and my website in about a week)

Geoff


"Eckhard Sallermann" <eckhard.s...@bur-kg.de> wrote in message
news:ap5re1$rkm9h$1...@ID-104793.news.dfncis.de...

Phil McGuinness

unread,
Oct 23, 2002, 9:57:32 AM10/23/02
to
snip[ does anyone have a structure-description of the FPT-Files ?]

http://www.e-bachmann.dk/docs/xbase.htm

Phil McGuinness
----------------


"Eckhard Sallermann" <eckhard.s...@bur-kg.de> wrote in message
news:ap5re1$rkm9h$1...@ID-104793.news.dfncis.de...

Eckhard Sallermann

unread,
Oct 23, 2002, 11:27:01 AM10/23/02
to
Hi *,

set memoblock to 64

is it possible, that this is only used when creating a DBF + FPT-File ??
I donn´t think it is used when reading/writing data to such files, because
the used blocksize for reading/writing data is retrieved from the Header
in the FPT-File.

Ecki

"Eckhard Sallermann" <eckhard.s...@bur-kg.de> schrieb im Newsbeitrag
news:ap5re1$rkm9h$1...@ID-104793.news.dfncis.de...

Eckhard Sallermann

unread,
Oct 23, 2002, 11:28:50 AM10/23/02
to
i need this Information because i want to be sure that there will be
no problems when wrtiting/reading to DBF-FPT-Files with Clipper and VO

Ecki

"Eckhard Sallermann" <eckhard.s...@bur-kg.de> schrieb im Newsbeitrag

news:ap6f8g$rung2$1...@ID-104793.news.dfncis.de...

Phil McGuinness

unread,
Oct 23, 2002, 11:45:14 AM10/23/02
to
snip[ i want to be sure that there will be no problems when wrtiting/reading
to DBF-FPT-Files with Clipper and VO]

There will be a problem if you are using Clipper 5.2 which is Flex II and VO
is Flex III
Clipper 5.3 used Flex III.

Remember that Fle II and Flex III are different formats.

Also you have to what set your ANSI() settings to get it to work.

Phil
----

"Eckhard Sallermann" <eckhard.s...@bur-kg.de> wrote in message

news:ap6fc3$rqhke$1...@ID-104793.news.dfncis.de...

Eckhard Sallermann

unread,
Oct 23, 2002, 11:45:02 AM10/23/02
to
Okay Phil, but i am not using Comix 3.09 with Clipper, are there also
problems ?
When yes, what kind of problems could it be ß

Ecki

"Phil McGuinness" <hey...@sherlock.com.au> schrieb im Newsbeitrag
news:ap6fv9$s7u9f$1...@ID-88745.news.dfncis.de...

Phil McGuinness

unread,
Oct 23, 2002, 12:09:21 PM10/23/02
to
snip[ not using Comix 3.09 with Clipper, ]

mmm.. Are you creating FPT / DBV memos and what RDD is creating them. This
is the important issue.

If you are using Flex for your memos then you have a DBV or FPT extension.
If using Clipper 5.2 you are generating Flex II memos if your are using
Clipper 5.3 you are generating Flex III memos.

snip[ what kind of problems could it be ß ]
Without knowing which version of Clipper 5.2 or 5.3 and are you using Flex
.... more information required..

The basic problem is they are different formats and things especially like
arrays storage and retrieval are a problem.
It has been tried before and will little success.

When developers are using VO and Clipper together most has been .DBT memos
and .NTX driver where they are quite compatible.

Phil
----


"Eckhard Sallermann" <eckhard.s...@bur-kg.de> wrote in message

news:ap6gab$rl89c$1...@ID-104793.news.dfncis.de...

Eckhard Sallermann

unread,
Oct 23, 2002, 12:13:49 PM10/23/02
to
Phil, Comix RDD ( from Loadstone , like Fortress is) creates FPT Memofiles.
I am using Clipper 5.2e

Ecki


"Phil McGuinness" <hey...@sherlock.com.au> schrieb im Newsbeitrag

news:ap6hcf$s5n1h$1...@ID-88745.news.dfncis.de...

Phil McGuinness

unread,
Oct 23, 2002, 12:46:49 PM10/23/02
to
snip[ Phil, Comix RDD ( from Loadstone , like Fortress is) creates FPT
Memofiles. ]

OK.. so are they FlexII type .FPT or Fox .FPT
Flex stuff recycled records and did a lot of neat stuff the .FPT did not do.

One of the reasons for Flex III was to make it Fox/MicroSlop compatible.
The Memo size was 32 or 33 depending on who you believe for compatibility.

Comix was written by one of the VO developers (David) and Flex was written
by another (Brice) but they mayhave been on different teams at the time.
Brian sold the Comix and Flex stuff to CA for inclusion in Clipper and VO
and so under VO2,6 they are meet again...

Phil
----

"Eckhard Sallermann" <eckhard.s...@bur-kg.de> wrote in message

news:ap6i08$rroo9$1...@ID-104793.news.dfncis.de...

Eckhard Sallermann

unread,
Oct 23, 2002, 1:02:31 PM10/23/02
to
Hi Phil,

do i understand this right? Vo 2.5b3 uses Flex Type III and Clipper/Comix
(3.09)
uses Typ II ?
So i will not be able to share that FPT-File with Clipper and VO ?

Ecki

"Phil McGuinness" <hey...@sherlock.com.au> schrieb im Newsbeitrag

news:ap6jin$s4j81$1...@ID-88745.news.dfncis.de...

Phil McGuinness

unread,
Oct 23, 2002, 1:31:58 PM10/23/02
to
snip[ do i understand this right? ]
I hope so..
==
snip[ Vo 2.5b3 uses Flex Type III ]
Yes
===
snip[ and Clipper/Comix (3.09) ]
Yes.. and I doubt it is Flex... it may be .. but I doubt it.
===
snip[ So i will not be able to share that FPT-File with Clipper and VO ?]
Well maybe yes may no...

The Flex 312 library has a library to link into Clipper 5.2 which gives you
Flex III
Have not tried but I believe you can do it. I am sure Steve Quinn and I got
this working a few years ago.
If do use be aware of you ANSI settings and even Collation sequence.

Phil McGuinness
-------------------

"Eckhard Sallermann" <eckhard.s...@bur-kg.de> wrote in message

news:ap6kri$s7v9v$1...@ID-104793.news.dfncis.de...

Eckhard Sallermann

unread,
Oct 23, 2002, 1:26:56 PM10/23/02
to
i tried the following:

Does the following error mean the incompatibility between VO + Comix ?

Comix 1011
a write wich should have worked failed
this would occur if the media failed or a physical lock
on the region existed.

Ecki


"Phil McGuinness" <hey...@sherlock.com.au> schrieb im Newsbeitrag

news:ap6jin$s4j81$1...@ID-88745.news.dfncis.de...

Stephen Quinn

unread,
Oct 23, 2002, 9:41:42 PM10/23/02
to
Phil

Your incorrect with some of that info
COMIX and SIXDRIVER create FPT type memoes the same as VO and Flexfile 3.
Flexfile 2 is the outsider in this case - they are non-standard, ergo the
switch to 'standard' form in Flexfile 3.

Stephen Quinn

unread,
Oct 23, 2002, 9:45:42 PM10/23/02
to
Ecki

> Does the following error mean the incompatibility between VO + Comix ?
>
> Comix 1011
> a write wich should have worked failed

NO - you need to make sure ALL variables are covered in both Clipper and VO
MEMOBLOCKSIZE
INDEX KEYS
ANSI/OEM
COLLATION

Read my other post re: Phil was incorrect in some of the info imparted to
you.

Phil McGuinness

unread,
Oct 23, 2002, 9:46:30 PM10/23/02
to
Steve,

snip[ COMIX and SIXDRIVER create FPT type memoes ]

I did not say they did not create FPT memos... I said I do not believe they
created FLEX type FPT memos.
Lots of products create FPT memos..

You have to remember that Brice added dynamic record and space recovery into
his Flex which does not happen in standard FPT memos. Original Flex memos
were not FPT compatible and this is why he called them DBV's.
As the FPT format was the standard he had to add this compatibility and of
course the good Flex stuff as well.

Phil
----

"Stephen Quinn" <squ...@brutecom.com.au> wrote in message
news:ap7isl$sj5ui$1...@ID-88745.news.dfncis.de...

Stephen Quinn

unread,
Oct 23, 2002, 10:29:38 PM10/23/02
to
Phil

I'm not arguing that

COMIX creates Fox FPT format files - ie has nothing to do with Flexfile
SIXDRIVER creates Fox FPT format files - ie has nothing to do with Flexfile
VO creates Fox FPT format files - It uses Flexfile 3

So to get - Fox FPT format files all of the following apply (excluding
DBFMDX)
Clipper 5.2 and SIXDRIVER
Clipper 5.2 and SIXDRIVER with FLEXFILE 3
Clipper 5.2 and COMIX
Clipper 5.2 and DBFNTX and DBFMEMO from FLEXFILE 3
Clipper 5.3 uses COMIX and FLEXFILE 3 by default
VO uses COMIX and FLEXFILE 3 by default
VO and DBFNTX and DBFMEMO

>You have to remember that Brice added dynamic record and space recovery
into
>his Flex which does not happen in standard FPT memos.

I think you'll find he wrote Flexfile because of the inefficient data
storage with DBTs than FPTs, it's only later, after M$ bought FOX, that FPTs
became the 'standard'.

Phil McGuinness

unread,
Oct 23, 2002, 10:38:20 PM10/23/02
to
Steve,

I dont have a problem with anything you said.
I dont even know what the issue is anymore.... It got lost in the detail.

Phil
----

"Stephen Quinn" <squ...@brutecom.com.au> wrote in message

news:ap7lmj$rupg1$1...@ID-88745.news.dfncis.de...

Eckhard Sallermann

unread,
Oct 25, 2002, 3:32:18 AM10/25/02
to
Hi Stephen, hi Phil,

the results of my test running the last days:

Creating a DBF-FPT with Clipper and writing with Clipper + Comix 3.09 and VO
CDX
will work. But when deleting recs with clipper or trying to add some text to
an existing
Memofiled will result in the following error with Clipper.

Comix 1011
a write wich should have worked failed

this would occur if the media failed or a physical lock on the region
existed.

These are the VO settings

SetAnsi(FALSE)
SetCollation(#CLIPPER)
SetInternational(#CLIPPER)
SetExclusive(FALSE)
Set Date german
SetDateCountry(GERMAN)
SetDateFormat("DD.MM.YYYY")
SetCentury(TRUE)
SetDeleted( FALSE )
RDDINFO( _SET_FOXLOCK , FALSE )

Ecki


"Phil McGuinness" <hey...@sherlock.com.au> schrieb im Newsbeitrag

news:ap7m7q$s6uop$1...@ID-88745.news.dfncis.de...

Stephen Quinn

unread,
Oct 25, 2002, 3:43:51 AM10/25/02
to
Ecki

What's the memoblocksize??
They need to be the same for both apps.

If you want zip up the .prg and test AEF and I'll try here.

Eckhard Sallermann

unread,
Oct 25, 2002, 3:39:52 AM10/25/02
to
The memoblocksize is 64 for both, will test a little more
and than send my zipped test to you, okay ?


Ecki

"Stephen Quinn" <squ...@brutecom.com.au> schrieb im Newsbeitrag
news:apasfs$t5jn7$1...@ID-88745.news.dfncis.de...

Phil McGuinness

unread,
Oct 25, 2002, 3:58:16 AM10/25/02
to
Eckhard,

Note: Changing SetInternational() automatically changes SetCollation() so
that the two settings are the same.

Do me a favour... create a memo in VO and have a look with any Editor and
you should see ;

FlexFile3 in the first say 100 characters.

OK... create a Memo in Clipper + Commix 3.09

What is in the first 100 characters of that memo..?

Better still send me a DBF and MEMO you have created in your Clipper
environment.

Phil McGuinness
--------------------

"Eckhard Sallermann" <eckhard.s...@bur-kg.de> wrote in message

news:apas6g$tahp3$1...@ID-104793.news.dfncis.de...

Eckhard Sallermann

unread,
Dec 5, 2002, 4:49:11 AM12/5/02
to
Hi *,

now i was trying using Flock() instead of rlock.
all the same whether i do an append or replace in that DBF-FTP-CDX
i first call Flock(), write/appen to that file and than do an unlock and
this seems to work.

Ecki

"Phil McGuinness" <hey...@sherlock.com.au> schrieb im Newsbeitrag

news:apatbl$ta2gt$1...@ID-88745.news.dfncis.de...

0 new messages