Click to See Complete Forum and Search --> : Ignore Commas
Magnetic Flux
August 18th, 1999, 10:46 AM
Using Visual Basic 6, I'm trying to import a non comma separated text file to a database and I'm inputting("Input #1") the lines line by line and then I test it with a series of If statements using "mid(integer, 1, 10)" (this is an example). Now this is all fine but if one of those (1+10)characters is a comma (like "Long, Mike") then it goes to the next field and throws the hole thing off.
Can someone help me?
/\
/ \
____/ \ __/\ ___________________
\ / \/
\ /
\/
Magnetic Flux
August 18th, 1999, 11:21 AM
I feel that the first message was not direct and was a little around the bush.
If I have an integer with the text "Long, Mike" and I want to putt that in to a database field "Database.Field1 = integer" it will put "Long" into field1 and "Mike" into field2 but I want "Long, Mike" in field1 and nothing in field2. How can I do that?
Signed:
Magnetic Flux
A.K.A. MFlux
"There is no spoon!"
August 18th, 1999, 01:22 PM
Use get an put to format the input file first. This will put a necessary delimiter for you. If U know the file structure then it is simple. If U dont know the structure try parsing each idenifier and use a counter how many fields will be in each line.
Hope this will be of some use.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.