?
Solved

SQLBulkCopy into FoxPro Database

Posted on 2013-06-18
2
Medium Priority
?
365 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
Olaf Doschke earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

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