Question about methodology for Gurus

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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
    4. 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...
    5. 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...
  3. #2

    Default 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...
    > 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
    >
    >

    Jan Tielens Guest

  4. #3

    Default 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...
    > 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...
    > > 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

  5. #4

    Default 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...
    > 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 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...
    > > > 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
    > > >
    > > >
    > >
    > >
    >
    >

    Dino Chiesa [Microsoft] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139