Solved

SQLBulkCopy into FoxPro Database

Posted on 2013-06-18
2
358 Views
Last Modified: 2013-06-18
Can I use the SQLBulkCopy on a FoxPro Database?
If YES, can someone provide me an example?

Thanks,
Mark
0
Comment
Question by:smithmrk
2 Comments
 
LVL 29

Accepted Solution

by:
Olaf Doschke earned 500 total points
ID: 39257439
SQLBulkCopy is for SQL Server only.

See the similarities:

ODBCConnection
OLEDBConnection
SQLConnection

ODBCCommand
OLEDBCommand
SQLCommand

but there is no ODBCBulkCopy or OLEDBBulkCopy. I'd be willing to learn, if I'm wrong here.

That said a way to fill a dbf as bulk operation typically goes via CSV file. There's a nice utility from Robert Buster, see http://social.msdn.microsoft.com/Forums/en-US/visualfoxprogeneral/thread/ef3d7500-ba76-4e6a-a207-e8d81320598e/

It's working good even with CSV contents VFP itself fails to load, eg with multi line texts delimited with quotation marks, VFPs APPEND FROM ...TYPE CSV will take each CRLF as record separator, while the definition of CSV allows CRLF within character field delimiters.

That doesn't help to fill directly from a DataTable, but I'm sure you can go through CSV.

Typically you would go the inverse route from DBF to SQL, which of couse is possible, eg as shown here: http://www.webdbtips.com/241746/


Bye, Olaf.
0
 

Author Closing Comment

by:smithmrk
ID: 39257460
Thanks!
I didn't think there was a way, but I thought I would at least ask.
I'll look into possibly using the CSV file solution at a later time...I'm using a DataTable right now as you mentioned, so I guess I'm stuck with the 20 mintues it takes to load now.

Thanks again,
Mark
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question