Import TAB delimited text file into SQL 2005

  • Thread starter Thread starter shil
  • Start date Start date
S

shil

Hi,

I'm trying to find a right way the data from a TAB delimited UTF-8
text file into SQL database. My text file has Unicode characters like
ö, é. I'm trying to code this in vb.net. Can any one guide me in the
right direction?

Thanks.
 
Hello,

you should open the file with a StreamReader and pass the
Encoding.UTF8Encoding encoding to the constructor:

Dim instance As New StreamReader(path, encoding)

You can then read through the file with the instance.ReadLine() method.

Best regards,
Henning Krause


Hi,

I'm trying to find a right way the data from a TAB delimited UTF-8
text file into SQL database. My text file has Unicode characters like
ö, é. I'm trying to code this in vb.net. Can any one guide me in the
right direction?

Thanks.
 
¤ Hi,
¤
¤ I'm trying to find a right way the data from a TAB delimited UTF-8
¤ text file into SQL database. My text file has Unicode characters like
¤ ö, é. I'm trying to code this in vb.net. Can any one guide me in the
¤ right direction?

There are several possibilities here. Have you tried using the SQLBulkCopy class or the Transact SQL
Bulk Insert statement?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Hi,

I'm trying to find a right way the data from a TAB delimited UTF-8
text file into SQL database. My text file has Unicode characters like
ö, é. I'm trying to code this in vb.net. Can any one guide me in the
right direction?

Thanks.

If you have very large text files you might also want to investigate SQL
server's bulk insert statement
 
Back
Top