Passing SqlDataReader thro a web service...

C

Colin Basterfield

Hi,

I was trying to generate a c# proxy file which contained a web method that
returned SqlDataReader but the wsdl http://localhost/etc etc said it wasn't
able to do the necessary reflection, does anyone know anything about this?

I can supply more info if needed.

TIA
Colin
 
G

Guogang

DataTable, DataReader can not pass through web service.

You can use DataSet to pass data through web service.
 
J

Jan Tielens

A DataReader needs a connection to the database. So it doesn't make any
sense to pass it through a webservice, since a webservice is by default
stateless. Once the webmethod invocation is finished no connection from the
client to the server will be available.

A DataSet suits this scenario very well, because it's disconnected. You fill
it with data and then you can pass it around, there's no connection to the
DB needed.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top