Example: lrd_assign_literal

In the following example, lrd_assign_literal assigns values to the host variable F_D1. The values assigned to the variable are not null-terminated—they contain null characters. The lrd_bind_placeholder function binds the host variable to the placeholders.

 /* Insert employee data into the employee table. */
lrd_stmt(Csr2, "insert into employees (emp_firstname,emp_lastname)" "values(:F,:L)", -1, 1 /*Deferred*/, 1 /*Dflt Ora Ver*/, 0);
lrd_assign_literal(&F_D1, "Jim\x00\x00\x00", "", 0, 0);
lrd_assign_literal(&F_D1, "Bob\x00\x00\x00", "", 1, 0);
lrd_assign_literal(&F_D1, "Mike\x00\x00\x00", "", 2, 0);
lrd_bind_placeholder(Csr2, "F", &F_D1, 0, 0);
lrd_assign(&L_D2, "Smith", "", 0, 0);
lrd_assign(&L_D2, "Jones", "", 1, 0);
lrd_assign(&L_D2, "Anderson", "", 2, 0);
lrd_bind_placeholder(Csr2, "L", &L_D2, 0, 0);