Solved

SQL Server 2000 append table from text file

Posted on 2008-06-24
1
192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 20

Accepted Solution

by:
hes earned 500 total points
ID: 21919101
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

749 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