Sending LONG Data Using Static SQL

Send LONG values to the database using static SQL from an embedded SQL application.

Prerequisites

There are no prerequisites for this task.

Task
  1. Declare a host variable of type DECL_LONGVARCHAR, DECL_LONGNVARCHAR, or DECL_LONGBINARY, as appropriate.
  2. If you are sending NULL, set the indicator variable to a negative value.
  3. Set the stored_len field of the host variable structure to the number of bytes of data in the array field.
  4. Send the data by opening the cursor or executing the statement.

The embedded SQL application is ready to send LONG values to the database.