Not able to split astring-need ur help
For example :
I have following things:
Name:Sujha
Age 23
Phone : 90886543...
Now,Iam able to split this whole file and insert into DB..The problem is if i have
Name:Sudha...
It is written in the Database..But if i have..
Name Sudha(without any delimiters) iam not able to write it in database,Also
If i have Name: Sudha(with a space)iam not able to write it in database
All these values are in a single text file Where i have to read all values and insert into DataBase..
The Code i use is...
fields = Split(lines(line_num), delimiter)
'fields = lines(line_num)
For field_num = LBound(fields) To UBound(fields)
'l_strFind = InStr(lines(line_num), "EXPIRY DATE")
Select Case fields(field_num)
'Select Case l_strFind
Case Is = "Name:"
For field_num1 = LBound(fields) To UBound(fields)
If (field_num1 < UBound(fields)) Then
' MsgBox fields(field_num + 1)
yourRef = Trim(fields(field_num + 1))
'field_num = field_num + 1
Exit For
Else
yourRef = Trim(fields(field_num))
End If
Next
Please help Me out Vb Guru'S...

