Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Low Level File Blues
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Low Level File Blues
Miscellaneous
Thread ID:
00405598
Message ID:
00405598
Views:
47
I am doing some fixing of Credit Card Postings in a pcc file. Here is how the file is opened:
Store FOPEN('a:\NPC1.pcc') TO gnFileHandle && Open the file
Store FSEEK(gnFileHandle, 0, 2) TO gnEnd && Move pointer to EOF
Store FSEEK(gnFileHandle, 0) TO gnTop && Move pointer to BOF
*-- gstring is the contents
gcString = FGETS(gnFileHandle, gnEnd) && Store contents
*-- what we started with
g1=gcString

I find my bits, switch them and then try to FWRITE() but it returns 0, and the changes are not stored.

Here is my closing :
w=Fwrite('a:\NPC1.pcc', gcString, gnEnd)

fflush('a:\NPC1.pcc')
fclose('a:\NPC1.pcc')

W will always = 0?

What am i missing?

If I do :
y=fputs('a:\NPC1.pcc', gcString, gnEnd)
it give no result = 0

TIA
__Stephen
Next
Reply
Map
View

Click here to load this message in the networking platform