Hello,
I have written this program in VB6. It read certain html files. The files have some standard text that is the same in each of this html files. Behind this standard text are variables.
I have to read these variables in a database (can't use asp or stuff because the html-files are coming from a third person.)
Everything goes well and all data is being written in the database, UNTIL I reach a comma in the variables...
When there is a comma, my program keeps looping a certain part and I can't stop it.
Here is a part of the code:
If InStr(RawData, "Title:" <> 0 Then //searches the word
title (standard text)
in the html file
place = InStr(RawData, "Title:"
length = Len("Title:"
length2 = length + place
character = Mid(RawData, length2, 1)
counter = 0
Do While character <> "<" // it keeps looping here when
the character is a comma
str10 = str10 + character
counter = counter + 1
place2 = length2 + counter
character = Mid(RawData, place2, 1) //when character
should be a comma,
it displays as an
empty string in
the debugger and
keeps giving an
empty string.
Loop
MsgBox (str10)
End If
for example:
If I have to read the variable 40,5 ... it goes well until the 0, but after that I keep getting a blank space in stead of a comma. This is when I use the debugger. When I use the program normally, it's in a unlimited loop and I can't get out of the program.
What am I doing wrong!!!! Can somebody help me? Thanks!
I have written this program in VB6. It read certain html files. The files have some standard text that is the same in each of this html files. Behind this standard text are variables.
I have to read these variables in a database (can't use asp or stuff because the html-files are coming from a third person.)
Everything goes well and all data is being written in the database, UNTIL I reach a comma in the variables...
When there is a comma, my program keeps looping a certain part and I can't stop it.
Here is a part of the code:
If InStr(RawData, "Title:" <> 0 Then //searches the word
title (standard text)
in the html file
place = InStr(RawData, "Title:"
length = Len("Title:"
length2 = length + place
character = Mid(RawData, length2, 1)
counter = 0
Do While character <> "<" // it keeps looping here when
the character is a comma
str10 = str10 + character
counter = counter + 1
place2 = length2 + counter
character = Mid(RawData, place2, 1) //when character
should be a comma,
it displays as an
empty string in
the debugger and
keeps giving an
empty string.
Loop
MsgBox (str10)
End If
for example:
If I have to read the variable 40,5 ... it goes well until the 0, but after that I keep getting a blank space in stead of a comma. This is when I use the debugger. When I use the program normally, it's in a unlimited loop and I can't get out of the program.
What am I doing wrong!!!! Can somebody help me? Thanks!