Webservice problems.
Hello. I am desperately trying to send data from a client application to a webserver via a webservice. Apparently I cannot pass an object class as a parameter, so have decided to use a dataset. When I run the code, I get the following error at this line in Reference.vb:Dim results()AsObject =Me.Invoke("SendSpecs",NewObject() {serial})
An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll
Additional information: Server was unable to process request. --> Object reference not set to an instance of an object.
This occurs even when I simply request a dataset from the webservice. Here is the code for my webservice.
<WebMethod()>PublicFunction SendSpecs(ByVal serialAsString)As DataSet
Dim dsMainAs DataSet
Dim cmdAs SqlCommand =New SqlCommand
Dim paramAsNew SqlParameter
dsMain.Clear()
cnMain.Open()
cmd.CommandText = "Select * From PCSpecs Where SerialNo = @SerialNo"
param.ParameterName = "@SerialNo"
param.Value = serialNo
cmd.Parameters.Add(param)
cmd.Connection = cnMain
Dim daMainAsNew SqlDataAdapter(cmd)
daMain.Fill(dsMain, "PCSpecs")
cnMain.Close()
Return dsMain Thanks,
I call the code client side by:dsSpec = WMIservices.SendSpecs(serial). Can anyone help me with this? I have been trying for ages, and really need this to work.
Robert

