Pro*C and Indicator Variables Question

From: rcarey <rcarey_at_gte.net>
Date: 1996/12/30
Message-ID: <32C80E42.3354_at_gte.net>#1/1


[Quoted] I've used Pro*C for a while now, however the use of indicator variables are somewhat new for me. Any help or comments would be appreciated.

I have a question about using Pro*C, PL/SQL and indicator variables. In a simple select statement like shown below, would the route.len value be zero if route_cd was a NULL value?

    EXEC SQL SELECT route_cd into :route

             FROM waste
             WHERE pkg_id = :pkg;

    route.arr[route.len] = NULL;

[Quoted] I was told by Oracle that even when using the NVL function I needed to use indicator variables to set float variables to zero if there was a NULL returned from the database (ie: if (id_value == -1) value = 0.0; placed in my C code). I tried it and it works great. Seems strange that the NVL function wouldn't take care of it for me.

[Quoted] Does anyone know if NVL would be required for varchar data or would I need to use indicator variables for that as well?

Thanks,

Rob Carey
rcarey_at_gte.net Received on Mon Dec 30 1996 - 00:00:00 CET

Original text of this message