VBGamer |
|
RE: heheh, s'okay Adam Hoult (0 replies, 0 views) (2000-May-6) =) Glad you took it like that. Nice to speak to you again Luckster !!!
Mind you this all depends on whether you're using Random or Binary files, random files WILL write the descriptor, binary files will not. So we are both right =)
Sorry i read over the initial post again and you didn't say what type of file you were using. For some reason i had read that you were using Random files, but on closer examination you didn;t say anything. I hate it when that happens =)
That could be your problem then, if you are using a binary file format, either place your string inside a UDT (where descriptors ARE written) or make it a fixed length string (as lucky suggested =) or switch over to writing your files as RANDOM not BINARY.
Lucky : If you hadn't have said "but I'm sure you're right about it" i wouldn't have even checked into it =) Im always paranoid about people saying stuff like that, i have to make sure i really was right hehe. Thanks.
Here is what the help says regarding Variable Length strings for the two file types.
Random Files:
If the variable being written is a variable-length string, Put writes a 2-byte descriptor containing the string length and then the variable.
Binary Files:
Put writes variable-length strings that are not elements of user-defined types WITHOUT the 2-byte length descriptor. The number of bytes written equals the number of characters in the string.
Looks like i've been out of the VB loop for too long =) DAMN YOU C++ . (I'm too used to writing my own damn descriptors hehe)
Adam |