Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Madan Mohan_DELHI
  Where is Madan Mohan_DELHI?
 Delhi
 India
 Madan Mohan_DELHI
 Tags
Subject: RE: Import from VFP Tables to Excel/CSV
Thread ID: 372324 Message ID: 373701 # Views: 40 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Microsoft Office Automation
Date: Monday, March 25, 2013 3:32:30 PM         
   


> >
> > Madan,
> > IMHO a dbf with memo is not exportable to CSV. A CSV by definition,
> >
> > -Have a header line containing the field names separated with commas (Comma Separated Value - CSV)
> > -Each line is a record.
> >
> > In the case of VFP, a memo might have carriage return and/or line feed characters in it and thus would break the 'one record per line'.
> >
> > I prefer not to have something like CSV between the source (VFP) and target (say SQL server, Excel, ...) and instead the target gets the data directly from VFP without using an intermediate text file where possible. If that is not possible, then I would choose XML or JSON formats to transfer the data as text and delimited/CSV would be the last options.
> >
> > So think in terms of where you need it and who will be the receiver of that data. Almost any backend are capable of reading XML and/or JSON (well they can even read directly from a dbf too using the drivers).
> >
> >

> > Cetin Basoz
> >
> > .Net has got better.Think about moving - check my blog:
> > My Blog
> >

> > MongoDb Certified Developer
> > MongoDb Certified DBA
> >

> > Support Wikipedia
>
>
> Cetin,
> Request you if could help me to convert from dbf to VFP with memo, if any line in memo is discarded due to any reason it is fine then it is fine with us.
>
> Need help.
> Regards,
> Madan

Madan,
Then you can do something like this:

Select myField1, myField2, ..., ,cast(mline(myMemoField, 1) as c(254)) as myMemoField ;
 from myTable ;
 into cursor crsExport ;
 nofilter

copy to myCSV.csv type csv




Cetin Basoz

.Net has got better.Think about moving - check my blog:
My Blog


MongoDb Certified Developer
MongoDb Certified DBA


Support Wikipedia

ENTIRE THREAD

Import from VFP Tables to Excel/CSV Posted by Madan Mohan_DELHI @ 3/7/2013 2:46:47 PM
RE: Import from VFP Tables to Excel/CSV Posted by Cetin Basoz @ 3/7/2013 4:11:46 PM
RE: Import from VFP Tables to Excel/CSV Posted by Madan Mohan_DELHI @ 3/25/2013 12:49:09 PM
RE: Import from VFP Tables to Excel/CSV Posted by Cetin Basoz @ 3/25/2013 1:05:00 PM
RE: Import from VFP Tables to Excel/CSV Posted by Madan Mohan_DELHI @ 3/25/2013 1:27:22 PM
RE: Import from VFP Tables to Excel/CSV Posted by Anders Altberg @ 3/25/2013 1:43:30 PM
RE: Import from VFP Tables to Excel/CSV Posted by Madan Mohan_DELHI @ 3/25/2013 1:56:13 PM
RE: Import from VFP Tables to Excel/CSV Posted by Anders Altberg @ 3/25/2013 4:52:23 PM
RE: Import from VFP Tables to Excel/CSV Posted by Cetin Basoz @ 3/25/2013 3:32:30 PM
RE: Import from VFP Tables to Excel/CSV Posted by Madan Mohan_DELHI @ 3/26/2013 12:08:06 PM
RE: Import from VFP Tables to Excel/CSV Posted by Tore Bleken @ 3/26/2013 12:17:01 PM
RE: Import from VFP Tables to Excel/CSV Posted by Madan Mohan_DELHI @ 3/26/2013 12:26:14 PM
RE: Import from VFP Tables to Excel/CSV Posted by Madan Mohan_DELHI @ 3/26/2013 12:32:55 PM
RE: Import from VFP Tables to Excel/CSV Posted by Tore Bleken @ 3/26/2013 12:52:14 PM
RE: Import from VFP Tables to Excel/CSV Posted by Cetin Basoz @ 3/26/2013 8:19:13 PM
RE: Import from VFP Tables to Excel/CSV Posted by Madan Mohan_DELHI @ 3/27/2013 4:57:19 AM
RE: Import from VFP Tables to Excel/CSV Posted by Cetin Basoz @ 3/27/2013 10:35:39 AM