Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Save grid contents to a text file
Message
From
20/08/2004 20:06:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
20/08/2004 19:37:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00934781
Message ID:
00935119
Views:
24
I suspect that VFP repeats the titles after whatever it considers to be a new page (i.e., after a certain number of lines).

I suggest to SELECT into a DBF (or cursor), and from there, use one of the options of the COPY TO command, for example, COPY ... DELIMITED - or perhaps some other options.

You have complete control over all the details if you, yourself, write the loop to write one line at a time - or even less - to the output file (for example, with LLFF, or, easier, with ?/??), but this is not always necessary.

Greetings,

Hilmar.

>hi again hilmar!
>
>i'm up a blind alley. i'm trying to use the copy to mytext.txt type delimited to realize i need to get data from 3 tables.
>
>my main table has the fields empno and comid. empno is in table employee, and comid is in table comments.
>
>so i try to use this sql statement,
>
>
>select a.status, a.empno, prop(allt(b.lastname)+", "+allt(b.firstname)+iif(!empty(b.mid)," "+b.mid+".","")), a.signoutdate, a.signout, a.signindate, a.signin, c.comments ;
>from inout a, employee b, comments c where b.empno=a.empno and c.comid=a.comid ;
>order by a.signoutdate desc, a.signout desc, a.signin ;
>to file mytext
>
>
>however, i noticed i'm getting more than one field name in the text, like this
>
>
>STATUS              EMPNO                  EMPNAME
>.T.                 00000                  LENNON, JOHN
>.T.                 00001                  MCCARTNEY, PAUL
>STATUS              EMPNO                  EMPNAME
>.F.                 00002                  STARR, RINGO
>.F.                 00003                  HARISON, GEORGE
>
>
>
>
>why is that? how can i avoid this? or is there any way to do this?
>
>pls advice. TIA.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform