Skip to Content
avatar image
Former Member

Returning null values to a Web Service datawindow from .NET

Sorry everyone, I am working in a new area for me, web services, and I keep having to ask questions here. Hopefully I'll get the hang of it soon 😊

I have a .NET web service returning SOAP data using basicHTTPBinding. I can create a datawindow from the method and retrieve data. One of the columns in the returned data is an int, and that column in the database for one of the records is set to null. However, int is not nullable in .NET. You can use int? to get a nullable version but that can't be passed back to Powerbuilder as it is a complex datatype apparently.

So my question is, how do you get null values from the database to a Powerbuilder datawindow via a .NET Web Service (or is it not possible and I should just give up).

Thank you!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 29, 2014 at 04:31 PM

    Hi Aron,

    Please review this info from the documentation:

    SyBooks Online

    The System.Nullable type is a standard representation of optional values and as such it is also classified as generic and therefore cannot be consumed in PowerBuilder .NET applications.

    In .NET Assembly and Web service targets, you can select a check box to map PowerBuilder standard datatypes to .NET nullable datatypes. Nullable datatypes are not Common Type System (CTS) compliant, but they can be used with .NET Generic classes if a component accepts or returns null arguments or if reference arguments are set to null

    HTH,

    Jacob

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Aron,

      I created WCF target with one dw, structure and nvo. The nvo had one method to retrieve the dw.

      I created a WPF target with one window and dw with the WCF as the data source.

      I created a win32 target with one window and dw with the WCF as the data source.

      No hacks or work arounds and took just a few minutes.

      The WCF was self-hosted which is great for developing because you don't have to fool with IIS.

      hth,

      Mark