Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSV(comma delimited files)

Status
Not open for further replies.

Irish

MIS
Joined
Apr 28, 1999
Messages
1
Location
US
I have to write an exe that monitors a comma delimited text file, open it and add the data to an Access database for web access. I need a jump start. I don't know where to begin.
 
Generally, you would use the "Open" statement to start.

"Line Input" is normally used to read individual lines from the input.

CSV files may me conveniently broken into individual values by a variety of methods, Including InStr (Searching for the delimiter character {","}), or "Split". Although in both of these, you need to be careful of 'embeded' delimiters (e.g. where the delimiter character is part of a value, such as when the comma is part of an address as in "City, State ZipCode"). Once the various parts of the line are identified, add a new record to the table and populate it with the values form the input.

Repeat untill EOF on the input.



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
MICHEAL;

CAN YOU PLEASE GIVE ME SOME EXAMPLE ON CODING? I AM CREATING AN APPLICATION, WHICH IS GOING TO READ A SEQUENTIAL FILE (WITH TAB DEMILITOR) AND THEN I NEED TO ADD (UPDATE) THE TABLE WITHOUT OVERWRITING THE EXISTING DATA.

I AM BIGINNER IN VB & I NEED HELP ON THIS. PLEASE HELP ME.

THANKS IN ADVANCE.

 
I think you need to use the resources you already have. Lookup the various statements in the VB Help system. Most of them have reasonable examples of the use of hte statements. You should check those first. It will be MUCH faster, as I can only do this on a limited basis, while your help file is omnipresent. If, after using the Help resource, you need some minor clarification on a specific statement or function argument, I's sure someone will be glad to help with specifics.



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top