473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DataReader in a web service

Is it possible to return a SQLdatareader from a web
service?
Jul 19 '05 #1
2 8630
You cannot return a SqlDataReader from a Web Service. This
is a stream based object which cannot be serialized to
cross machines boundaries over SOAP. You can use the
DataSet instead.
-----Original Message-----
Is it possible to return a SQLdatareader from a web
service?
.

Jul 19 '05 #2
Hello and Greetings,

Dear David:
Well what you can do instead of using dataset (as it is heavy) just have the
datareader stream packed in some object that could be crossed over using web
services. I usually convert all my complex types into a string
implementation and at the other end (Webservice client) I convert it back.
It works for most of my implementations, though I have never tried to do
this with a datareader but I guess you can do it. Give it a try and reply
back with the results.

Remember there is a slight disadvantage attached to this practice. As such
implantations can only work with custom clients. It sort of beats the
underlying principle of universal interpretably of the web services.

Another option could be using Remoting if the scenario allows it.

By the datasets are heavy but you would have to agree that they are best way
to send large amounts of data (specifically relational data), as it is has
many options built into it and is natively supported by the Webservices.

Also don't forget to read the doc mentioned below on MSDN:

- Consuming a DataSet from an XML Web Service

J, Happy Coding
Take Care,

Rai Umair - .NET Question? .NET Answer! http://www.raiumair.com
"Dave O" <da***********@btinternet.com> wrote in message
news:67****************************@phx.gbl...
Is it possible to return a SQLdatareader from a web
service?

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Yasutaka Ito | last post by:
Hi, My friend had a little confusion about the working of DataReader after reading an article from MSDN. Following is a message from him... <!-- Message starts --> I was going thru DataReader...
2
by: Dave O | last post by:
Is it possible to return a SQLdatareader from a web service?
20
by: Mark | last post by:
Hi all, quick question , a DataView is memory resident "view" of data in a data table therefore once populated you can close the connection to the database. Garbage collection can then be used to...
2
by: Grant | last post by:
Hi, I keep getting the following error message: InvalidOperationException: There is already an open DataReader associated with this Connection which must be closed first. I have read up...
1
by: Brent | last post by:
I'm having a hard time wrapping my head around how to build a multi-dimensional array of n length out of a DataReader loop. Take this pseudo-code: ======================================= public...
8
by: David Perona | last post by:
Hi all, I have a web service that connects to a SQL Server database and return an sqlDataReader Object. When launch the web service in the web browser, this exception is thrown: "Object...
4
by: Tedmond | last post by:
Dear all, How to code a Web Service function that returns either a DataTable or DataReader to the clients? Or I should use other alternative? Thanks for any help! Tedmond
7
by: Diffident | last post by:
Hello All, I would like to use DataReader based accessing in my Data Access Layer (DAL). What is considered to be a best practice while returning from a DAL method that executes a query and...
4
by: rikleo2001 | last post by:
Hello Experts. I need your help, I am new to XML web service, and I have to complete one task. Here is current situation. 1. I have web service running to recieve SOAP message from an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.