Thanks Erel...But I didn't get any proper solution.....Please see my below code and convert this code to "HttpUtils2"
Sub Activity_Create(FirstTime As Boolean)
HttpClient12.Initialize("HttpClient12")
LoadGrid("Select * from Arind.Dbo.Color")
End Sub
Sub LoadGrid(Query As String)
Dim request12 As HttpRequest
Dim URL12 As String
URL12 =
http://202.89.74.123:85/RemoteDB/ShowGridNew.asp?Param="&Query
request12.InitializeGet(URL12)
request12.Timeout = 10000 'set timeout to 10 seconds
If HttpClient12.Execute(request12, 1) = False Then Return 'Will be false if their is already a running task (with the same id).
ProgressDialogShow("Calling KHARIND server...")
End Sub
Sub HttpClient12_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Log("ResponseSuccess")
ProgressDialogHide
Dim result As String
Dim s As String
Dim Rows() As String
Dim Cols() As String
Dim Header As List
Dim J As Int
result = Response.GetString("UTF8") 'Convert the response to a string
s = result
Rows = Regex.Split("[|]", s)
For i = 0 To Rows.Length - 1
Cols = Regex.Split("[*]", Rows(i))
'DoEvents
'ProgressDialogShow("Calling KHARIND Server........")
Dim Record(Cols.Length) As String
If i = 0 Then
Dim tHeader(Cols(i)) As String
Dim cWidth(Cols(i)) As Int
If Table1.IsInitialized Then
Table1.RemoveView
End If
Table1.Initialize(Me, "Table1", Cols(i),True)
Table1.AddToActivity(PnlRight, 0, 0dip, PnlRight.Width, PnlRight.Height)
'Table1.AddToActivity(Activity, Scale.Right(PnlLeft), 0dip, 100%x - Scale.Right(PnlLeft),PnlLeft.Height)
Table1.ClearAll
Else If i = 1 Then
For J = 0 To Cols.Length - 1
tHeader(J) = Cols(J)
Next
Table1.SetHeader(tHeader)
Else If i = 2 Then
For J = 0 To Cols.Length - 1
If Cols(J) = 135 Then
cWidth(J) = 80dip
Else If Cols(J) = 200 Then
cWidth(J) = 120dip
Else
cWidth(J) = 65dip
End If
Next
Else
For J = 0 To Cols.Length - 1
Record(J) = Cols(J)
Next
Table1.AddRow(Record)
End If
Next
Table1.SetColumnsWidths(cWidth)
ProgressDialogHide
End Sub
Sub HttpClient12_ResponseError (Reason As String, StatusCode As Int, TaskId As Int)
Log(Reason)
Log(StatusCode)
ProgressDialogHide
msg = "Error connecting to server."
If Reason <> Null Then msg = msg & CRLF & Reason
ToastMessageShow (msg, True)
End Sub