Code:
' Imports System.IO
' Open file
Using reader As New StreamReader("d:\path\filename.txt")
Do
' Read a line
Dim Line As String = reader.ReadLine
If Len(Line) > 0 Then
Dim Name As String = ""
Dim Value As String = ""
' Split on colon (:)
Dim Values() As String = Split(Line, ":")
' Value to left of colon is in array element 0
Name = Values(0)
' Values to right of colon are in array elements 1..n
' Special case (e.g., Date): Values containing colons must be concatenated
For I As Integer = 1 To Values.Length - 1
Value &= Values(I)
Next
' Update database with Name and/or Value
End If
Loop Until reader.EndOfStream
End Using
Bookmarks