473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Import TAB delimited text file into SQL 2005

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.

Mar 15 '07 #1
3 9044
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
"shil" <jo******@gmail.comwrote in message
news:11**********************@e1g2000hsg.googlegro ups.com...
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.

Mar 16 '07 #2
On 15 Mar 2007 14:27:27 -0700, "shil" <jo******@gmail.comwrote:

¤ 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)
Mar 16 '07 #3
On 15 Mar 2007 14:27:27 -0700, shil wrote:
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
--
Bits.Bytes
http://bytes.thinkersroom.com
Mar 16 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: atse | last post by:
Hi, I still have problem to import the text file delimited by tabs or commas into the database. I refer to http://www.connectionstrings.com/ for the connection, ODBC doesn't work and OLD DB...
1
by: Rob | last post by:
Please help point me in the right direction to import a CSV file into a Datagrid. Below is the error I'm receiving, OLE csv format file, sample CSV file, and code I've tried to no success. ...
1
by: DCM Fan | last post by:
Access 2K, SP3 on Windows 2K, SP4 All, I have an import spec set up with quoted Identifiers and comma-separated values. The text file is produced by a 3rd-party program of which I have no...
1
by: mark | last post by:
In Access 2000 and 2002, I have created an import specification to import the fixed-width recordset below into an existing table. I am having strange problems with the import of the date and time...
1
by: Shaun Harwood | last post by:
Hello all Here is a puzzle I hope someone has a solution for. I am trying to import a delimited text file using a Visual Basic 'TransferText' command. So that the table is created properly I...
4
by: Viswanathan S | last post by:
Hi All! How to import text file into vb.net dataset? For example a text file with 1000 records as tab delimited text. The text file contain string, number and date field data. I want to...
3
by: Davy B | last post by:
I am trying to import a data file, which is tab delimited, using BULK INSERT. I have used BCP to create a format file, since the destination table has around 20 columns, but the data file has only...
0
by: Shawn Ferguson | last post by:
With the help of you, I've been able to successfully load my database with the contents of a "comma" delimited file. It loads about 5000 records in about 3 seconds:) Now I have another problem. ...
7
by: Pete | last post by:
I need to import multiple tab delimited files for which I do not have the formats. All files have column headers in the the line. The files must be dynamic. The only common value is that the...
1
by: InvestorTrade | last post by:
Hi, I've been trying to export/import a table from a DB with Chinese_PRC_CI_AS collation, and I can't seem to get it working at all - the export seems rather simple, it is the import that is not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.