Using web services to retun a data set

  • Thread starter Thread starter Jeremy Ames
  • Start date Start date
J

Jeremy Ames

I have a web service that I have created that reads information from a
database and returns the results in a dataset. When I am trying to retrieve
this information, I keep getting a null reference error message. This is the
syntax I am using:

DataSet dsNew = localhost.EmployeeSearch(someString);

How should I be handling this?
 
Jeremy,

Is the exception being thrown by the EmployeeSearch method, or is it
being thrown because localhost is not set to a reference of an object? If
it is in the EmployeeSearch method, then you need to trace through the code
in the web service. Otherwise, you have to trace through the code calling
the web service, determining why localhost is null.

Hope this helps.
 
I found that I forgot to instantiate the object. That was my bad.
Although that opened a new problem. I am now receiving a 401 error when I
try to execute the web services method. This is all local so it should have
the same permissions, I would think. Do you have any suggestions to resolve
this?

message Jeremy,

Is the exception being thrown by the EmployeeSearch method, or is it
being thrown because localhost is not set to a reference of an object? If
it is in the EmployeeSearch method, then you need to trace through the code
in the web service. Otherwise, you have to trace through the code calling
the web service, determining why localhost is null.

Hope this helps.
 
Back
Top