I am having difficulties finding a good way to import data from a text file into a db. I have tried several ways but no success. What is a good way to do it?
I have tried the following code from the thread "Information on how to look at a text file" on Jun 11, 2001. Could not figure out how to move to the next line.
dim temp as string
dim tempArray() as string
open myText.txt for read as 1
Line Input #1, temp 'temp is used to store the line
temparray = split(temp,"," 'This line will split the raw line up based on the comma
'Do whatever else that you need to do with tokens....
Also tried:
Open strImportFile For Input As #1 ' Open File for Input
Input #1, strTemp 'IP_ID, IP_BName, IP_BLoc, IP_Name, IP_PolNum, IP_EffDate, IP_ExpDate, IP_Class, IP_PDF, IP_PolVer, IP_PDFPath, strTemp.........
But again, how do I move to the next line for input?
Thanks in advance. ************
My purpose in life is to show others what not to do.
<!--Caution, dates on calendar are closer then they appear.-->
I have tried the following code from the thread "Information on how to look at a text file" on Jun 11, 2001. Could not figure out how to move to the next line.
dim temp as string
dim tempArray() as string
open myText.txt for read as 1
Line Input #1, temp 'temp is used to store the line
temparray = split(temp,"," 'This line will split the raw line up based on the comma
'Do whatever else that you need to do with tokens....
Also tried:
Open strImportFile For Input As #1 ' Open File for Input
Input #1, strTemp 'IP_ID, IP_BName, IP_BLoc, IP_Name, IP_PolNum, IP_EffDate, IP_ExpDate, IP_Class, IP_PDF, IP_PolVer, IP_PDFPath, strTemp.........
But again, how do I move to the next line for input?
Thanks in advance. ************
My purpose in life is to show others what not to do.
<!--Caution, dates on calendar are closer then they appear.-->