Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Low Level Function question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00600268
Message ID:
00600289
Views:
17
>>I'm using low level file fuctions to log certain miscellaneous errors to a text file (I generally log all errors to the SQL Server database this app uses - but if I can't get a connection, or the append fails, I use the text file).
>>
>>If the file already exists, I open it using FOPEN, then move the pointer to the end of the file using Fseek(lnFileHandle, 0, 2) and then tried using both FPUTS and FWRITE to append to the file.
>>
>>This didn't work and I'm not sure why. When I changed the code to read the contents of the file to a variable using FILETOSTR and then adding to the variable before using FPUTS, it worked OK. Is this the only way to do this - or is it possible to append to a text file using the low level functions without using FILETOSTR first?
>
>But ... do you FOpen the file for Write ?


DOH! You know, last night when I was working on this, I was absolutely sure I was opening the file for Write - turns out I wasn't. It works now. Thanks.
Al Williams

Anola MB, CANADA
Previous
Reply
Map
View

Click here to load this message in the networking platform