Advertisement

03.12.2008 at 10:39AM PDT, ID: 23235976
[x]
Attachment Details

Bulk copying text files into SQL server via VB.net (2008)

Asked by TommyMac501 in Visual Studio, Algorithms

Does anyone have a clear routine for bulk copying files from a flat text file (no delims) into SQL server (7) inside a VB.net (2008) program?

We need to read directly from the text file into SQL, without BCP (i.e. within the program), but the data files are entirely too large to create a memory table or to read the whole file first.  The files are on average 800,000 records (record lengths up to 2048) on up to over 6 million.

I have a routine that connects to SQL, builds a table from the record structure information, but I have no way to actually move it into SQL without looping through readline(s), which will take forever.

Any ideas?

TMStart Free Trial
[+][-]03.12.2008 at 12:58PM PDT, ID: 21110099

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 01:16PM PDT, ID: 21110283

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 01:29PM PDT, ID: 21110412

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 01:31PM PDT, ID: 21110430

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Studio, Algorithms
Sign Up Now!
Solution Provided By: Kdo
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628