Hello all-

I have a split function for seperating out a csv formatted text file. (Fields seperated by commas with Double Quotes around text). The issue is that many of the fields have descriptive text where someone uses a comma. How do I make sure the split function ignores those commas?

-----Code that does the initial split
aTmp = Split(aData(b), chr(44))

-----Code that runs the sql string and gets rid of the double quotes.
sValueList = sValueList & ", " & SQLString(aTmp(aFieldPositionList(c) - 1))

-----Function being called above
function SQLString(sString)

sTmp = Trim(sString)
if Len(sTmp) then
SQLString = "'" & Replace(Replace(sTmp, chr(34), ""), "'", "''") & "'"
else
SQLString = "null"
end if

end function