damxuanthai
Well-known member
Hi all Prof.
Today I have a problem on Web service that I can not find the way to get out.
The Problem is
I made a webservice and put it on my host
"http://damxuanthai.edu.vn/damxuanthai01.asmx"
In which, I have a webmethod to select and return a datashet from one database mdb file.
This web function can work online well when be called by any .aspx files in my site
Now I make make a Window form contain 1 datagridview and 1 button, I try to get my datashet:
But It make an Error
I don't know to solve this Error.
I am hopefully waitting for some solutions.
Today I have a problem on Web service that I can not find the way to get out.
The Problem is
I made a webservice and put it on my host
"http://damxuanthai.edu.vn/damxuanthai01.asmx"
In which, I have a webmethod to select and return a datashet from one database mdb file.
VB.NET:
<WebMethod()> _
Public Function SelectDataShet() As DataSet
Dim strConnectionToDatabase As String = "Provider=Microsoft.Jet.Oledb.4.0; Data Source =" & strPublicMDBpath
Dim cls As New clsDoDatabase(strConnectionToDatabase)
Dim dtsOut As New DataSet
cls.FillData_ToDataShet(dtsOut, strQuiry)
Return dtsOut
End Function
This web function can work online well when be called by any .aspx files in my site
Now I make make a Window form contain 1 datagridview and 1 button, I try to get my datashet:
VB.NET:
Dim Mb As New Online.damxuanthai01
Dim dtbList As New DataSet
dtbList = Mb.SelectDataShet
DataGridView1.DataSource = dtbList.Tables(0)
But It make an Error
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object. at damxuanthai01.SelectDataShet() --- End of inner exception stack trace ---
I don't know to solve this Error.
I am hopefully waitting for some solutions.