DataReader in WebService??

  • Thread starter Thread starter Freddy Curasi
  • Start date Start date
F

Freddy Curasi

Hi,
I'm new in this. Is it recommendable use Datareader, like return value in a
WebService? What is the best way?
Please Help me.
Thanks
 
Comments below:

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
Freddy Curasi said:
Hi,
I'm new in this. Is it recommendable use Datareader, like return value in a
WebService?
If I understand you correctly, in that you're asking if using a dataReader
to extract a value and use the Web Service to return that value, then the
answer is 'yes' per se. In general, the WS doesn't really care how you get
a value, say for intance a String = "Ryan". If I'm storing that value in a
Database, I'm going to have to use a dataReader one way or another to get
that value out and return it. (that's b/c I can explicitly call the Command
object's .ExecuteScalar or ExecuteReader or I can use a dataAdatper to Fill
a datatable - which uses a dataReader under to covers to fill it.

BUT (and this is a big but), do not take this to mean that it's ok to
attempt to pass a datareader via the WS - I say attempt b/c you won't get
very far. So if using a Reader to get some data is what you're asking -
yes, you're good to go.
What is the best way?

'Best' is a hard thing to recommend b/c very few things are 'best' across
the board. Within the context of my comments above, I'd glad to be more
specific if you can elaborate a little more.

HTH,

Bill
 
Back
Top