• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 635
  • Last Modified:

how to find record count via web service in c#

From the webserivce http://www.nhs24.com/nhs24_supportgroups.asmx?op=GetGroupById if you enter integer values between 1-6000 in nGroupId field. we get a valid xml record but if we try an integer above 6000 i.e. 6001 or more we get invalid response like below

<errorMessage>No results found</errorMessage>

How can we possibly find the valid values for this field or record count
1 Solution
There has to be some database logic that goes into retrieving the results.

This has nothing related to sending valid values. i.e more than a certain number(6000 in this case).

If the no. of groups present in the Database is 6000, you will get an such a result when you enter a value more than 6000.
mmalik15Author Commented:
thanks for the comment.

Are you saying that there is no way to find the record count from the client end before starting the loop to retrieve values?

To my knowledge I don't believe you can do without having more access to their data. What I normally do in this situation is handle the returned error message in the code.

If you wanted a list of all valid inputs you could quickly create a program to loop round 10000 times (example). Spawn alo request to the web service passing in the counter as the parameter and when you get the response, parse it for either GroupID or ErrorCode and depending on which you get pipe the results off to a certain cation  (DB, text file etc)


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now