Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Null terminating strings selected into host variables

Null terminating strings selected into host variables

From: <holman_at_fas.harvard.edu>
Date: Fri, 09 Apr 1999 16:45:53 GMT
Message-ID: <7elarv$per$1@nnrp1.dejanews.com>


Hello,

I'm new to Oracle embedded SQL, though have used SQL in other products.

I'm programming in C, and selecting into host variables, and finding that varchar2 data types are neither null terminated nor trim blanked. When I select directly into char arrays (not host variables), the strings are null terminated.

Should I expect that selecting into a host variable (a struct of several variable length char arrays and several int values) would null terminate a varchar2 string by default? Do I need to change all my varchar2 type columns to string type columns? Has anyone been here, done that?

TIA, Candace Holman
Network Software Engineer

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Apr 09 1999 - 11:45:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US