>Dear Sir,
>
>I have a table entitled "errors" contained following fields
>
>Date, time,errno,message,lineno
>
>I want to show only last record in text file, c:\error.txt,
>but the data of every field must show in new line for example
>
>31/12/2004
>10:00:00
>1200
>field not found
>3
>
>What should I do?
>Please help
>
>Thanks in advance
#define CRLF CHR(13)+CHR(10)
SELECT Errors
GO BOTTOM
c_str = ""
FOR nFlds = 1 TO FCOUNT()
c_str = c_str + ALLTRIM(TRANSFORM(EVAL(FIELDS(nFlds)))) + CRLF
NEXT
STRTOFILE(LEFT(c_str, LEN(c_str)-1),"Errors.TXT")
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.