Solved

SQLBulkCopy into FoxPro Database

Posted on 2013-06-18
2
348 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now