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

Home -> Community -> Usenet -> c.d.o.tools -> Newbie: Inserting Nulls in ODBC ?

Newbie: Inserting Nulls in ODBC ?

From: Jeff <MissingLink_at_n2mail.com>
Date: 2000/06/25
Message-ID: <8j5c6c$q24$1@newsg1.svr.pol.co.uk>#1/1

 Hi,

I can input a number into my simplified test table fine in C (shown below). But what do I have to change if I want to enter null instead of 0 ?

Is the solution similar for text fields etc ?

Thanks.

SDWORD sd_ind, cb_ind;
rc = SQLPrepare(Hstmt,

          "INSERT INTO test (mynumber)  VALUES ( ? )",
          SQL_NTS);
 rc=SQLBindParameter(Hstmt, 1, SQL_PARAM_INPUT, SQL_C_SLONG,
                      SQL_INTEGER, 0, 0, &sd_ind, 0, &cb_ind);
rc = SQLExecute(Hstmt); Received on Sun Jun 25 2000 - 00:00:00 CDT

Original text of this message

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