Solved

SQLBulkCopy into FoxPro Database

Posted on 2013-06-18
2
352 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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