By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,519 Members | 2,412 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,519 IT Pros & Developers. It's quick & easy.

method read a text file

P: n/a
Dear all,

Now I have the simple task to read text file line by line into database (SQL
Server 2000).
If the text file is divided into different fields according to the number of
characters, What is the best method to read into database.
In Oracle, I know it has sql loader. As to SQL Server, What should be? Do I
need to write the program to read each characters and line by line?

Thanks,
Aug 20 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Aug 20, 3:34*am, "Raymond Chiu" <rchiu...@yahoo.com.hkwrote:
Dear all,

Now I have the simple task to read text file line by line into database (SQL
Server 2000).
If the text file is divided into different fields according to the numberof
characters, What is the best method to read into database.
In Oracle, I know it has sql loader. As to SQL Server, What should be? DoI
need to write the program to read each characters and line by line?

Thanks,
If you want a SQL Server answer then you're in the wrong newsgroup -
you need to go to the one for SQL Server.

If you want a solution in VB.NET, first stop by google.com and search
for how to read a text file from .NET. There should be plenty of
examples out there.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
Aug 20 '08 #2

P: n/a
Raymond Chiu wrote:
Now I have the simple task to read text file line by line into database (SQL
Server 2000).
If the text file is divided into different fields according to the number of
characters, What is the best method to read into database.
Have a look at the bcp utility (SQLServer equivalent of the big O's
SQLLoader). It should be able to do what you want.

HTH,
Phill W.
Aug 20 '08 #3

P: n/a
"Raymond Chiu" <rc******@yahoo.com.hkschrieb:
Now I have the simple task to read text file line by line into database
(SQL Server 2000).
ConnectionStrings.com - How to connect to Textfile
<URL:http://www.connectionstrings.com/?carrier=textfile>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Aug 20 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.