Page 1 of 1

File Problem

Posted: Sun Aug 07, 2005 7:56 am
by RayBritton
Hi,
I have problem i saved in binary 27 varibles but there don't load correctly
(i'm using pds and the program is 1000+ lines so i can't put it up here)

Posted: Sun Aug 07, 2005 8:37 am
by MystikShadows
If you're always saving the same 27 variables all the time, you should use a type definition for those 27 fields this way, you'll always read what you save :-)....if you want an example, have a look at my binary file tutorial in pete's QB Express magazine Issue 8

http://www.petesqbsite.com/sections/exp ... inaryfiles

I use a typed structure in the example I use for the tutorial. if you have questions after that let me know here, in PM or email me, which ever you prefer.

Hope this helps

Posted: Sun Aug 07, 2005 11:14 am
by RayBritton
i found the problem, it's that when i open the file, as:

Code: Select all

INPUT "Name:",filename$
OPEN filename$ FOR BINARY ACCESS READ AS #1
this deletes the data in the file, or creates a new one