I have a large text file (1 long line) with multiple delimiters (eg: ~, *, :). The ~ delimiter marks a new section, and the * and : delimiters mark sub sections or segments.
I tried the following but I'm getting a type mismatch error, likely because the Split function is meant to be used on a string, not an array.
Dim strFileLine, arrSection, arrSegment, arrSegField
strFileLine = "C:\sometextfile.txt"
arrSection = Split(strFileLine, "~")
arrSegment = Split(arrSection, "*")
arrSegField = Split(arrSegment, ":")
I'm trying to use this logic to keep my segments and segment fields with the correct section, and insert those value into a database.
Any idea on how I can accomplish this with VBScript?