-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by 7J1L1M
-
-
Hay Toby,
I don't have LabVIEW 8.x, which would explain the Set File Position :headbang: . Isn't it nearly equivalent to "Seek" in LabVIEW 7.x?
If so, how could it help me replace a portion of a file with another string? If necessary, the operation could probably be performed in two steps: erase part of the file, then insert a string. Still, I have no method for removing part of a file without loading the entire file into LabVIEW and editing it with the string ops, then write it back to a blank file... :thumbdown:
Appreciate the comments, any further ideas would be most helpful!
7J1L1M
-
jdunham,
Unfortunately it will be the hard way
. But I will need to use this same concept for other file formats anyway, I'm just currently up with my head against the wall for this format...
Set File Position? Do you mean "Seek"? LabVIEW doesn't have any functions named "Set File Position".
Certainly if you can read a portion of a file, you can erase part of the file and replace it with something else... Or so it would seem...
If anyone has any more ideas, please write! :thumbup: Thanks!
7J1L1M
-
Hay!
I'm currently working on a custom database, and as most database experts know, they are normally very large files. The beauty of databases therefore is that you can lread and write portions of data without loading the entire file. Well, that is were I have run into a problem.
Given a file, I need to be able to replace a certain amount of data at a given offset with another string of data. But from what I can see, it is impossible to do this without loading the entire file as a string and then using the string operations to replace wherever, then write the entire string back to the file.
I really need to avoid this since the databases I'm dealing with could be very large (100 or more megabytes
.) Does anyone have any ideas on how to solve this? Maybe any Win32 functions designed for this? Any help is greatly appreciated!
7J1L1M
Replace portion of file data
in Database and File IO
Posted
Thanks for all the suggestions! I'll see what I can do with the "append to end of file" technique, although I'm afraid that will be extremely hectic and complicated for me
. One of my main goals with this format was to attain the smallest size possible (even at gigantic sizes! :laugh: ) for easy transfer, but still with the speed of commercial databases. I may have found something that will do what I've been wanting to do:
Windows Kernel32.dll has some functions called file mapping like "CreateFileMapping", "Memmove_a", and other similar functions. It looks like it may be possible to use these to actually "move" parts of the file to "nothing" and thereby erase it. I believe there is also an insert function. Does anybody have any experience with file mapping? If so, it may be possible to use this idea. Here's a link to a situation similar to mine that uses this method:
http://forum.soft32.com/pda/delete-part-bi...opict44773.html
If anyone has an idea for this, it would be most welcome!
7J1L1M