Ask a Question related to ASP.NET Web Services, Design and Development.
-
JR #1
Question about methodology for Gurus
Hi,
I have a question about the best method to return sql records through a web
service.
I will potentially be sending back anywhere from one to a thousand records
from a sql call through a webmethod. I would like some advice on the "Best"
way to send the data to the client. Right now I am filling a dataset from
the sql call, writing the xml to an xmlwriter object, then converting that
to a string which I then return to the client.
Would it be better to send back a collection or custom object or is there
another approach that I'm missing? I would like to keep this as scalable as
possible so I would like to avoid using datasets and such.
Thanks in advance,
Jamie
JR Guest
-
Service unavailable on First call in synchronous mode only! question for webservice.htc gurus.
Hi, This is a interesting problem. I got webservice.htc integrated pretty well with .net framework. I wrote a control that generates all the... -
basic methodology
This should be so simple, I'm almost ashamed to ask for help...but...Using Director6, I am trying to make a cd-rom presentation with a simple menu... -
Question to all ASP GURUS
Hi all Is there any way I can copy one folder from one place to another place over the internet.... Kind regards -
Security Methodology
I'm going to be writing an asp.net application that certain users have access to specific pages and others don't. User authorization will be... -
Technical question for the lens "gurus" out there...
I'm still new to lens calculations, but I was wondering if 'point and shoot' cameras can actually focus on objects at infinity? I imagine camera... -
Jan Tielens #2
Re: Question about methodology for Gurus
If you want to avoid a DataSet, I would recommend using custom objects in a
collection. Ofcourse this will be somehow a performance degradation, like
you have now when you serialize your DataSet to a string. Using custom
objects you get the advantage that you are working with types, instead of a
long string with xml in it. Ofcourse xml in string format is the most
flexible solution, so it's always the choice between flexibility and
ease-of-use.
If your concern is interoperability (e.g. communication with java clients),
the custom objects won't raise any issues. I've succesfully implemented such
a solution without any problems regarding the communication between .NET and
Java.
--
Greetz
Jan Tielens
________________________________
Read my weblog: [url]http://weblogs.asp.net/jan[/url]
"JR" <xylixian@yahoo.com> wrote in message
news:#G$q4NtvDHA.2508@TK2MSFTNGP12.phx.gbl...web> Hi,
>
> I have a question about the best method to return sql records through a"Best"> service.
>
> I will potentially be sending back anywhere from one to a thousand records
> from a sql call through a webmethod. I would like some advice on theas> way to send the data to the client. Right now I am filling a dataset from
> the sql call, writing the xml to an xmlwriter object, then converting that
> to a string which I then return to the client.
>
> Would it be better to send back a collection or custom object or is there
> another approach that I'm missing? I would like to keep this as scalable> possible so I would like to avoid using datasets and such.
>
>
> Thanks in advance,
> Jamie
>
>
Jan Tielens Guest
-
JR #3
Re: Question about methodology for Gurus
Great info, thanks for the advise Jan.
"Jan Tielens" <jan@no.spam.please.leadit.be> wrote in message
news:%23hj8syvvDHA.1908@TK2MSFTNGP10.phx.gbl...a> If you want to avoid a DataSet, I would recommend using custom objects ina> collection. Ofcourse this will be somehow a performance degradation, like
> you have now when you serialize your DataSet to a string. Using custom
> objects you get the advantage that you are working with types, instead ofclients),> long string with xml in it. Ofcourse xml in string format is the most
> flexible solution, so it's always the choice between flexibility and
> ease-of-use.
>
> If your concern is interoperability (e.g. communication with javasuch> the custom objects won't raise any issues. I've succesfully implementedand> a solution without any problems regarding the communication between .NETrecords> Java.
>
> --
> Greetz
>
> Jan Tielens
> ________________________________
> Read my weblog: [url]http://weblogs.asp.net/jan[/url]
>
>
> "JR" <xylixian@yahoo.com> wrote in message
> news:#G$q4NtvDHA.2508@TK2MSFTNGP12.phx.gbl...> web> > Hi,
> >
> > I have a question about the best method to return sql records through a> > service.
> >
> > I will potentially be sending back anywhere from one to a thousandfrom> "Best"> > from a sql call through a webmethod. I would like some advice on the> > way to send the data to the client. Right now I am filling a datasetthat> > the sql call, writing the xml to an xmlwriter object, then convertingthere> > to a string which I then return to the client.
> >
> > Would it be better to send back a collection or custom object or is> as> > another approach that I'm missing? I would like to keep this as scalable>> > possible so I would like to avoid using datasets and such.
> >
> >
> > Thanks in advance,
> > Jamie
> >
> >
>
JR Guest
-
Dino Chiesa [Microsoft] #4
Re: Question about methodology for Gurus
If you want the table metaphor, you can also do something like
[WebMethod(Description="returns an XmlNode derived from a DataSet. This
form excludes schema info. ")]
public System.Xml.XmlNode GetDataSet_XmlDoc(int orderId) {
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
System.Data.DataSet ds= Service(orderId);
doc.LoadXml(ds.GetXml());
return doc;
}
"JR" <xylixian@yahoo.com> wrote in message
news:O0aV80yvDHA.3416@tk2msftngp13.phx.gbl...in> Great info, thanks for the advise Jan.
>
>
> "Jan Tielens" <jan@no.spam.please.leadit.be> wrote in message
> news:%23hj8syvvDHA.1908@TK2MSFTNGP10.phx.gbl...> > If you want to avoid a DataSet, I would recommend using custom objectslike> a> > collection. Ofcourse this will be somehow a performance degradation,of> > you have now when you serialize your DataSet to a string. Using custom
> > objects you get the advantage that you are working with types, insteada> a> clients),> > long string with xml in it. Ofcourse xml in string format is the most
> > flexible solution, so it's always the choice between flexibility and
> > ease-of-use.
> >
> > If your concern is interoperability (e.g. communication with java> such> > the custom objects won't raise any issues. I've succesfully implemented> and> > a solution without any problems regarding the communication between .NET> > Java.
> >
> > --
> > Greetz
> >
> > Jan Tielens
> > ________________________________
> > Read my weblog: [url]http://weblogs.asp.net/jan[/url]
> >
> >
> > "JR" <xylixian@yahoo.com> wrote in message
> > news:#G$q4NtvDHA.2508@TK2MSFTNGP12.phx.gbl...> > > Hi,
> > >
> > > I have a question about the best method to return sql records throughscalable> records> > web> > > service.
> > >
> > > I will potentially be sending back anywhere from one to a thousand> from> > "Best"> > > from a sql call through a webmethod. I would like some advice on the> > > way to send the data to the client. Right now I am filling a dataset> that> > > the sql call, writing the xml to an xmlwriter object, then converting> there> > > to a string which I then return to the client.
> > >
> > > Would it be better to send back a collection or custom object or is> > > another approach that I'm missing? I would like to keep this as>> > as> >> > > possible so I would like to avoid using datasets and such.
> > >
> > >
> > > Thanks in advance,
> > > Jamie
> > >
> > >
> >
>
Dino Chiesa [Microsoft] Guest



Reply With Quote

