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: 373691 # Views: 51 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Microsoft Office Automation
Date: Monday, March 25, 2013 1:05:00 PM         
   


> >
> > CSV files have problem with some data types (like date, datetime, blob, memo ...). I wouldn't use CSV in between at all. It is easy to directly transfer to Excel instead. Search for VFP2Excel here on Foxite.
> >
> > I wouldn't even use Excel in between. Again it may have problems with blob/memo and if the data is large. Instead I would directly use VFPOLEDB in SSIS or use a Linked server if I would do this from SQL server side.
> >
> > What I am currently doing is to use an activex that I wrote in .Net and directly send data to SQL server (this is from VFP to SQL server approach. Fastest way I have ever seen from VFP side). You can see sample here:
> >
> > http://screencast.com/t/g4uTnyuws
> >
> > Or if you could read from SQLite in SSIS then it is also a better option than Excel IMHO (or better yet SQL Server CE which is next to native for SQL server and can be used in replication). Both are much faster.
> >
> >

> > Cetin Basoz
> >
> > .Net has got better.Think about moving - check my blog:
> > My Blog
> > Blog (mirror) - sounds to be down
> >

> > Support Wikipedia
>
> Cetin,
> I used VFP2Excel your written program which works fine converting DBF to XLS including memo.
> What changes I need to do in VFP2Excel program to migrate data from dbf to CSV with memo field?
> I request you please help me in letting me know the changes.
>
> Many Thanks,
> Madan

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

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