Re: Mutli Type in same file
- From: fajp@xxxxxxxxxxxxxxxxxxxx (Frank Adam)
- Date: Fri, 05 May 2006 13:20:11 +1000
On Thu, 4 May 2006 15:21:48 -0400, "Tiblay" <tiblay@xxxxxxxxxxxx>
wrote:
Hello,You need to either use a binary file and write your own get and put
I try to use 2 differents TYPE in one file, the first is for keep the infos
about the rapport, and the second is the DATA. I need to save only one time
the first TYPE and after i save many time the seconde TYPE. How i can do
that ????
code for each types..
...Or pad out the FichierRappDesc structure to be an exact multiple of
the data structures, then you can use a Random file and just offset
each record number, by the number of records the header took up.
ie: if the data type is 200 bytes, and the header is 960, then pad the
header out to 1000 bytes and read that in via binary mode. Then you
can close and reopen the file in Random mode and find record 1 at
position 6. So your code to read record #1 would be :
"get #hfile,recNo+5,data" , because the header took up the first 5
record spaces. Makes sense ?
However, using a binary file and your own read and write code is not
too hard to do, much cleaner and will make more sense later on.
--
Regards, Frank
.
- References:
- Mutli Type in same file
- From: Tiblay
- Mutli Type in same file
- Prev by Date: Re: Kill Unattended VB6 Inifinite Loop
- Next by Date: Re: Starting an application
- Previous by thread: Mutli Type in same file
- Next by thread: Interactive Voice Response - IVR Info
- Index(es):
Relevant Pages
|
Loading