_ Public Function delCurTable(ByVal tbName As String) As Boolean
Try
Return True
Catch ex As Exception
Return False
End Try
End Function
关于这个webservice的同步调用方法我就不做说明了
异步调用
Private a As vbwebserviceDataManage定义一个webservice变量
Dim ar As IAsyncResult
public sub Callback(byval ar as IAsyncResult)
这里可以不写任何代码
这里的代码在调用方运行结束后开始运行
end sub
#region 异步调用
private sub btnStart_Click()
dim cb as asyncallback=new asyncallback(address(mecallback))
ar=abegindelcurtable(zdfcba)
end sub
private sub btnEnd_Click()
if ar is nothing then
exit sub
end if
if arIsCompleted Then
dim m as boolean=aenddelcurtable(ar)
messageboxshow(mtostring)
end if
end sub
#end region
注意返回异步调用的结果一次只能调用一次如果想再执行一遍就必须重新执行一遍begin的方法
以上是的用法下面是c#的用法
CWebServiceDataManage a;
SystemIAsyncResult ar;
private void Form_Load(object sender SystemEventArgs e)
{
a=new CWebServiceDataManage();
}
public void CallBack(SystemIAsyncResult ar)
{
}
private void btnStart_Click(object sender SystemEventArgs e)
{
SystemAsyncCallback cb=new AsyncCallback(thisCallBack);
ar=aBegindelCurTable(zhangcba);
}
private void btnEnd_Click(object sender SystemEventArgs e)
{
if(ar==null)
{
MessageBoxShow(null);
return ;
}
if(arIsCompleted )
{
bool m=aEnddelCurTable(ar);
MessageBoxShow(mToString());
}
else
{
MessageBoxShow(为完成);
}
}