Solved

SQL Server 2000 append table from text file

Posted on 2008-06-24
1
188 Views
Last Modified: 2008-07-08
i will be receiving a fixed width or a comma separated file from my vendors.  they will match the columns in my table.  I am using Visual Basic (2008) to match the vendors freight bills against the shipping table.  so I want to append the file i will receive everyday to the freight bill table when my user selects the vendor and clicks a button.  so how do I make this happen?  Would it be best to write a stored procedure and call that in my code or figure out how to write the code needed to append the daily vendor files to my db table?
0
Comment
Question by:Pioneermfg
1 Comment
 
LVL 20

Accepted Solution

by:
hes earned 500 total points
Comment Utility
If you are using VB then if the file is a CSV (Comma Seperated) file then just read in the file line by line then do a split on the file and that will create an array of each value that was seperated by a comma Array = Split(fileline,",")
Then insert that into a new record in the table.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now