Null values and web service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • barmatt80
    New Member
    • Dec 2007
    • 55

    Null values and web service

    I am stumped on a web service.

    I have a web service that calls a sql stored procedure. the procedure has 1 input and 20 output paramenters.

    I can call the stored procedure just fine and it works, but the problem i am having is values in the database are null values.

    How do i handle this so it does not kill my web service?

    Thanks for the help
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    #2
    when you're querying for output parameters....

    make use of ISNULL in the select query on a particular column

    Code:
    select ISNULL (Ord_Name,'') as OrderName from OrderMaster

    Comment

    • barmatt80
      New Member
      • Dec 2007
      • 55

      #3
      doesn't that say if Ord_Name is a null value, give it a empty string value?

      is it that easy?

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        I would think that you should be checking for DBNull... not your typical Null or Nothing.

        -Frinny

        Comment

        Working...