read text file line by line and insert/update values in table

Posted by I__ on Stack Overflow See other posts from Stack Overflow or by I__
Published on 2010-06-07T18:43:38Z Indexed on 2010/06/07 19:12 UTC
Read the original article Hit count: 165

Filed under:
|
|

i am exploring the option of whether DoCmd.TransferText will do what i need, and it seems like it wont. i need to insert data if it does not exist and update it if it does exist

i am planning to read a text file line by line like this:

Dim intFile As Integer
Dim strLine As String

intFile = FreeFile()
Open myFile For Input As #intFile
Line Input #intFile, strLine
Close #intFile

i guess each individual line will be a record. it will probably be comma separated and some fields will have a " text qualifier because within the field itself i will have commas

my question is how would i read a comma delimited text file that has double quotes sometimes as text qualifiers into a table in access?

© Stack Overflow or respective owner

Related posts about sql

Related posts about ms-access