请教:
basic4android 向 webservice 传值如何处理SQL查询 例如:我发送一个SQL查询,下面的 ?cSql=Select Bm,MC,GuiG From NM 会出现错误
basic4android 端:
Dim URL As String
Dim HttpClient1 As HttpClient
HttpClient1.Initialize("HttpClient1")
Dim cSql As String
cSql="Web_GetDataToXML?cSql=Select Bm,MC,GuiG From NM"
Dim request As HttpRequest
Log(URL & cSql)
request.InitializeGet(URL & cSql)
request.Timeout = 10000 'set timeout to 10 seconds
If HttpClient1.Execute(request, 1) = False Then Return 'Will be false if their is already a running task (with the same id).
ProgressDialogShow("正在链接到WebService...")
webservice 端:
<WebMethod()> _
Public Function Web_GetDataToXML(ByVal cSql As String) As String
Return GetTable(cSql).GetXml.ToString
End Function
basic4android 向 webservice 传值如何处理SQL查询 例如:我发送一个SQL查询,下面的 ?cSql=Select Bm,MC,GuiG From NM 会出现错误
basic4android 端:
Dim URL As String
Dim HttpClient1 As HttpClient
HttpClient1.Initialize("HttpClient1")
Dim cSql As String
cSql="Web_GetDataToXML?cSql=Select Bm,MC,GuiG From NM"
Dim request As HttpRequest
Log(URL & cSql)
request.InitializeGet(URL & cSql)
request.Timeout = 10000 'set timeout to 10 seconds
If HttpClient1.Execute(request, 1) = False Then Return 'Will be false if their is already a running task (with the same id).
ProgressDialogShow("正在链接到WebService...")
webservice 端:
<WebMethod()> _
Public Function Web_GetDataToXML(ByVal cSql As String) As String
Return GetTable(cSql).GetXml.ToString
End Function