web service dataset

Discussion in 'ASP .Net' started by Mike, Sep 2, 2004.

  1. Mike

    Mike Guest

    I have a web service that calls SP's and returning a dataset. At times the
    data is coming back as 0 and if that is the case i need to display nothing
    just leaving it blank. With accessing data like this how can I check to see
    if the data is 0?

    example:

    <Books>
    <computers>
    <type>Programming</type>
    <ISDN>0</ISDN>
    </computer>
    </Books>

    if ISDN is 0 i need to display nothing. how can i do that?
    I'm using a datalist to display the output. and calling the web method in
    the web service.
    vb.net code to all the web service

    public GetAllBooks()
    dim me as getbooks.book = new getbooks.book
    dim ds as new dataset
    dim dvBook as new dataview

    ds = me.GetBooks()
    dvBook = ds.table(0).defaultView
    dlBooks.datasource = dbBook
    dlBook.databind

    end sub
     
    Mike, Sep 2, 2004
    #1
    1. Advertising

  2. Hi Mike,

    As for the DataSet's checking problem you mentioned, I think Shailesh's
    suggestion that use the select method of the datatable is considerable if
    the the <ISDN> is just a simple column in the DAtaTable. Also, since the
    DataSet has GetXml method which can help return the dataset's xml
    representation, you can use the APIS under the System.Xml namespace to
    query this <ISDN> element (such as using the SelectSingleNode with
    specified xpath). Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Sep 2, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hocho888
    Replies:
    1
    Views:
    661
  2. Michael Averstegge
    Replies:
    0
    Views:
    4,272
    Michael Averstegge
    Jan 10, 2006
  3. Not Me
    Replies:
    1
    Views:
    3,207
    Not Me
    Jun 5, 2007
  4. Isaias Formacio Serna

    Web Service that calls an external Web Service

    Isaias Formacio Serna, Jan 28, 2004, in forum: ASP .Net Security
    Replies:
    5
    Views:
    259
  5. Leo Violette
    Replies:
    0
    Views:
    1,068
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page