PDA

View Full Version : fsofile.writeline Vs Write #filenum, String



Movian
07-06-2012, 08:10 AM
Hey,
Just bumped into this problem today. I setup a file export using the Filesystem object open text file system as it seems newer and more intuitive. However this only seemed to work on some machines, it worked on a virtual machine i was testing on, it worked on my machine and 2 clients machines. Then 3 other clients tried using it and goes invalid procedure call errors tied to the fsofile.writeline Variable line. I then changed this to use the older open #filenum for output method and that seems to work correctly on all systems.

Can anyone shed some light as to what may have been the problem and IF indeed one method is superior to the other ?

Tommy
07-06-2012, 10:23 AM
The problem systems do not have the Filesystem dll installed. Either that or the sys admin disabled it cause they keep screwing up things :)

They could not have read/write rights on the directory for some strange reason.

I have no idea which is better but I personally prefer the writeline due to I have more control over what gets put in the file. I have found that I like the whole file in memory so I can work with it. I also prefer to read and write in binary SO much faster. But if you are working on files that are say about 2k or less the difference between the 2 is not noticed.

Once again, this is my opinion and as such is subject to change without any apparant reason, or after another Microsoft release. :)