Solved

SQL Server 2000 append table from text file

Posted on 2008-06-24
1
190 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
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
add text to end of existing text in file 16 70
Restricting text box entry from \/:?<>"| 9 86
Sending a email via excel using vba 6 82
Visual Studio 2005 text editor 10 38
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 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