Unregistered
November 5, 2002, 14:54:21
I want to be able to load a TextControl File into a TextControl object on a web page.
I have seen all the examples but none of them show Text Control file loading.
The button click is:
Sub Button1_OnClick
Dim file
file = "note_temp.txw"
call Inet1.Execute("http://192.0.1.168/" & file, "GET")
If Inet1.ResponseCode <> 0 Then
MsgBox ("ErrorCode: " & Inet1.ResponseCode)
MsgBox ("Error: " & Inet1.ResponseInfo)
End If
End Sub
This works fine.
To catch the response, my code looks like this:
Sub Inet1_StateChanged(State)
Select Case State
Case 12
Dim strData: StrData = ""
Dim vtData
Dim bData
vtData = Inet1.GetChunk(10240, 1)
Do While LenB(vtData) <> 0
bData = bData & vtData
vtData = Inet1.GetChunk(10240, 1)
Loop
objTX.LoadFromMemory bData, 3, False
End Select
End Sub
I get a type mismatch error on this line "bData = bData & vtData",
and if I use icByteArray instead of 1, for the data type, I also get type mismatch errors.
Please can you help me, I am pulling my hair out here.
Chris Mitchell
This message was originally posted by Chris Mitchell in the old TX Text Control Support Forum.
I have seen all the examples but none of them show Text Control file loading.
The button click is:
Sub Button1_OnClick
Dim file
file = "note_temp.txw"
call Inet1.Execute("http://192.0.1.168/" & file, "GET")
If Inet1.ResponseCode <> 0 Then
MsgBox ("ErrorCode: " & Inet1.ResponseCode)
MsgBox ("Error: " & Inet1.ResponseInfo)
End If
End Sub
This works fine.
To catch the response, my code looks like this:
Sub Inet1_StateChanged(State)
Select Case State
Case 12
Dim strData: StrData = ""
Dim vtData
Dim bData
vtData = Inet1.GetChunk(10240, 1)
Do While LenB(vtData) <> 0
bData = bData & vtData
vtData = Inet1.GetChunk(10240, 1)
Loop
objTX.LoadFromMemory bData, 3, False
End Select
End Sub
I get a type mismatch error on this line "bData = bData & vtData",
and if I use icByteArray instead of 1, for the data type, I also get type mismatch errors.
Please can you help me, I am pulling my hair out here.
Chris Mitchell
This message was originally posted by Chris Mitchell in the old TX Text Control Support Forum.