Solved

SQLBulkCopy into FoxPro Database

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

690 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