Hi,
I have problem with logging into text file. When I run the program within design mode so it work well. But when I run it within runtime (app.exe) so it doesn't work. It cannot open the text file.
I use this function:
function logevent(cPozn)
local flog1
if file("log.txt")
flog1 = fopen("log.txt",12)
fseek(flog1,0,2)
else
flog1 = fcreate("log.txt")
endif
IF flog1 < 0
WAIT 'error' WINDOW NOWAIT
endif
cText = ttoc(datetime())+" "+cPozn
FFLUSH(flog1)
fclose(flog1)
endfunc
Thanks for any Ideas
I have problem with logging into text file. When I run the program within design mode so it work well. But when I run it within runtime (app.exe) so it doesn't work. It cannot open the text file.
I use this function:
function logevent(cPozn)
local flog1
if file("log.txt")
flog1 = fopen("log.txt",12)
fseek(flog1,0,2)
else
flog1 = fcreate("log.txt")
endif
IF flog1 < 0
WAIT 'error' WINDOW NOWAIT
endif
cText = ttoc(datetime())+" "+cPozn
FFLUSH(flog1)
fclose(flog1)
endfunc
Thanks for any Ideas