On Wed, Mar 18, 2009 at 2:37 PM, Paul Hill <[email protected]> wrote: > On Wed, Mar 18, 2009 at 5:19 PM, Stephen Russell <[email protected]> > wrote: >> This is a SSIS job or DTS in sql 2000. >> >> <http://en.wikipedia.org/wiki/SQL_Server_Integration_Services> >> >> This is real simple to do in .NET for working with Sql2005. Notice >> that I said it is not in SQL SSMS. Yes this got loaded when you >> installed SQL2005 but you probably never went to the Business >> Intelligence Development Studio. >> >> There you can connect the dbf to SQL containers. Set up any >> conversions you need. > > Many years ago I tried to use DTS to load a bunch of DBF files onto a > SQL server. > > The problem I found was that DTS was finicky (rightly so!) about > invalid data. My data was pretty old and started life as a DOS app in > the 80s. Fox will quite happily work with a date like {01/01/0001} > but SQL will reject it. > > For this reason I tend to use Fox to 'push' the data to SQL. This way > I can validate the data (including checking for Y2K problems, e.g. > 01/01/1902 becomes 01/01/2002). Other considerations might be to > write a NULL if a character field is empty. > > It's easy to write a small Fox program that generates CREATE TABLE and > INSERT statements into a text file (with the a 'GO' every 1000 or so > records) and then use isql/osql/sqlapp to execute this SQL batch. > > YMMV, in my case I was doing a one way, one time export from Fox. -------------------------------
So do you test for each insert and then massage if necessary? You could do all of that in the newer SSIS over what DTS could have done. But if you feel comfortable doing it from VFP go for it. Your only issue is that each row inserted has a log transaction for it. That takes time on the server side and might slow your import. SSIS fails to update the log. -- Stephen Russell Sr. Production Systems Programmer Web and Windows Development Independent Contractor Memphis TN 901.246-0159 _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

