Hi there all

Don't know if I'm at the wrong place, but I'll take that chance.

I am fed up battling with importing txt files to sql server 2005. I am re-writing a vb6 based application, that uses text files, to a c# based application that uses sql server 2005 as a database.

In sql server I use the import/exprot wizard to import the flat file. All worked fine for the first two text files, vechiles and users, but now the rest doesn't work at all. I tried converting to csv and then importing but nothing. It just keeps on giving me errors.

What I am trying now is perhaps replace the row delimeters from %#% to '.

Any suggestions will be usefull

Thanks

Are you looking for help to import into SQL server or writing C# code to do the import? Also, without seeing the files/table definition it is hard to help :)

I'm looking for help on how to import txt files into sql server 2005. The tables don't exist because the moment i import the txt files then only the tables will be created.

The error i get is the following:

- Executing (Error)
Messages
Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column "Column 7" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task: The "output column "Column 7" (31)" failed because truncation occurred, and the truncation row disposition on "output column "Column 7" (31)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)

Error 0xc0202092: Data Flow Task: An error occurred while processing file "Z:\ACS\Admin\ServU\JobBook\Langebaan\Client\Clientlist - Copy.txt" on data row 3.
(SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task: The PrimeOutput method on component "Source - Clientlist - Copy_txt" (1) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
(SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: Thread "SourceThread0" has exited with error code 0xC0047038.
(SQL Server Import and Export Wizard)

Error 0xc0047039: Data Flow Task: Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.
(SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error code 0xC0047039.
(SQL Server Import and Export Wizard)


And the txt file looks like this:

<edited-confidential-info>

Edited 5 Years Ago by ~s.o.s~: Edited confidential info as per user request

Is this actual data? I suggest you edit the post so this data isn't included in your post.

This question has already been answered. Start a new discussion instead.