dbTalk Databases Forums  

DTS Import Text File Replacement - too many errors with DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS Import Text File Replacement - too many errors with DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ed West
 
Posts: n/a

Default DTS Import Text File Replacement - too many errors with DTS - 02-04-2005 , 05:24 PM






I am using the DTS COM object to import a bunch of different text files.
some are 2 or 3 million rows. if there's an invalid row (can't find
row delimiter or column delimiter) sometimes DTS will crash and stop the
import... it even does it if I try to import it from the GUI, and going
into DTS tasks and messing with the errors rows, etc.

So, I am looking for a better way to batch import... can't use bulk
insert because of field qualifiers... any ideas? any 3rd party object i
can use to quickly import a large file?

i using c#, btw.

thanks

Ed

Reply With Quote
  #2  
Old   
Max
 
Posts: n/a

Default Re: DTS Import Text File Replacement - too many errors with DTS - 02-04-2005 , 06:10 PM






Did you look at the bcp utility? It ain't pretty, but for brute force,
it is hard to beat.


Reply With Quote
  #3  
Old   
oj
 
Posts: n/a

Default Re: DTS Import Text File Replacement - too many errors with DTS - 02-05-2005 , 01:55 AM



Bulk insert and bcp both can use format file (i.e. you can specify your
custom terminator), batch size, and allowable max error. You should check
them out.

--
-oj


"Ed West" <west (AT) westville (DOT) com> wrote

Quote:
I am using the DTS COM object to import a bunch of different text files.
some are 2 or 3 million rows. if there's an invalid row (can't find row
delimiter or column delimiter) sometimes DTS will crash and stop the
import... it even does it if I try to import it from the GUI, and going
into DTS tasks and messing with the errors rows, etc.

So, I am looking for a better way to batch import... can't use bulk insert
because of field qualifiers... any ideas? any 3rd party object i can use
to quickly import a large file?

i using c#, btw.

thanks

Ed



Reply With Quote
  #4  
Old   
Ed West
 
Posts: n/a

Default Re: DTS Import Text File Replacement - too many errors with DTS - 02-09-2005 , 01:50 AM




hi - many thanks, bcp/bulk insert is working great... i am creating a
format file dynamically.

thanks again

oj wrote:
Quote:
Bulk insert and bcp both can use format file (i.e. you can specify your
custom terminator), batch size, and allowable max error. You should check
them out.


Reply With Quote
  #5  
Old   
Ed West
 
Posts: n/a

Default Re: DTS Import Text File Replacement - too many errors with DTS - 02-15-2005 , 10:30 AM




Hello - what about a Field Qualifier? how can I specify that? For some
files, the field qualifier is " and that is showing up in the database
field after being imported... thanks

- Ed

oj wrote:
Quote:
Bulk insert and bcp both can use format file (i.e. you can specify your
custom terminator), batch size, and allowable max error. You should check
them out.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.