for ( i = 0; i < row.ncols; i++ ) {
SQLHSTMT sth;
+ ber_len_t col_len;
rc = backsql_Prepare( dbh, &sth, at->bam_delete_proc, 0 );
if ( rc != SQL_SUCCESS ) {
0, 0, e_id->eid_keyval.bv_val,
0, 0 );
Debug( LDAP_DEBUG_TRACE,
- " backsql_modify_delete_all_values() arg%d=%s\n",
+ " backsql_modify_delete_all_values() "
+ "arg%d=%s\n",
pno + 1 + po, e_id->eid_keyval.bv_val, 0 );
#else /* ! BACKSQL_ARBITRARY_KEY */
SQLBindParameter( sth, pno + 1 + po,
SQL_C_ULONG, SQL_INTEGER,
0, 0, &e_id->eid_keyval, 0, 0 );
Debug( LDAP_DEBUG_TRACE,
- " backsql_modify_delete_all_values() arg%d=%lu\n",
+ " backsql_modify_delete_all_values() "
+ "arg%d=%lu\n",
pno + 1 + po, e_id->eid_keyval, 0 );
#endif /* ! BACKSQL_ARBITRARY_KEY */
* check for syntax needed here
* maybe need binary bind?
*/
+ col_len = strlen( row.cols[ i ] );
SQLBindParameter( sth, pno + 2 - po,
SQL_PARAM_INPUT,
SQL_C_CHAR, SQL_CHAR,
- 0, 0, row.cols[ i ],
- strlen( row.cols[ i ] ), 0 );
+ col_len, 0, row.cols[ i ],
+ col_len, 0 );
Debug( LDAP_DEBUG_TRACE,
" backsql_modify_delete_all_values(): "
SQL_PARAM_INPUT,
SQL_C_CHAR, SQL_VARCHAR,
0, 0, e_id->eid_keyval.bv_val, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE,
+ " backsql_modify_internal(): "
+ "arg%d=\"%s\"\n",
+ pno + 1 + po, e_id->eid_keyval.bv_val, 0 );
#else /* ! BACKSQL_ARBITRARY_KEY */
SQLBindParameter( sth, pno + 1 + po,
SQL_PARAM_INPUT,
SQL_C_ULONG, SQL_INTEGER,
0, 0, &e_id->eid_keyval, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE,
+ " backsql_modify_internal(): "
+ "arg%d=\"%lu\"\n",
+ pno + 1 + po, e_id->eid_keyval, 0 );
#endif /* ! BACKSQL_ARBITRARY_KEY */
/*
SQLBindParameter( sth, pno + 2 - po,
SQL_PARAM_INPUT,
SQL_C_CHAR, SQL_CHAR,
- 0, 0, at_val->bv_val,
+ at_val->bv_len, 0, at_val->bv_val,
at_val->bv_len, 0 );
-
Debug( LDAP_DEBUG_TRACE,
" backsql_modify_internal(): "
- "executing \"%s\"\n",
- at->bam_add_proc, 0, 0 );
+ "arg%d=\"%s\"; executing \"%s\"\n",
+ pno + 2 - po, at_val->bv_val,
+ at->bam_add_proc );
+
rc = SQLExecute( sth );
if ( rc != SQL_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
*/
SQLBindParameter( sth, pno + 2 - po,
SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR,
- 0, 0, at_val->bv_val,
+ at_val->bv_len, 0, at_val->bv_val,
at_val->bv_len, 0 );
Debug( LDAP_DEBUG_TRACE,