backsql_PrintErrors( bi->sql_db_env, dbh,
asth, rc );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
- return LDAP_SUCCESS;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
rc = backsql_BindParamID( asth, 1, SQL_PARAM_INPUT, &e_id->eid_keyval );
asth, rc );
SQLFreeStmt( asth, SQL_DROP );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- return LDAP_SUCCESS;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
rc = SQLExecute( asth );
asth, rc );
SQLFreeStmt( asth, SQL_DROP );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- return LDAP_SUCCESS;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
backsql_BindRowAsStrings( asth, &row );
backsql_PrintErrors( bi->sql_db_env, dbh,
sth, rc );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- continue;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
if ( BACKSQL_IS_DEL( at->bam_expect_return ) ) {
sth, rc );
SQLFreeStmt( sth, SQL_DROP );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- continue;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
} else {
sth, rc );
SQLFreeStmt( sth, SQL_DROP );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- continue;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
#ifdef BACKSQL_ARBITRARY_KEY
Debug( LDAP_DEBUG_TRACE,
sth, rc );
SQLFreeStmt( sth, SQL_DROP );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- continue;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
Debug( LDAP_DEBUG_TRACE,
/* SQL procedure executed fine
* but returned an error */
rs->sr_err = BACKSQL_SANITIZE_ERROR( prc );
- rs->sr_text = op->ora_e->e_name.bv_val;
- SQLFreeStmt( sth, SQL_DROP );
- return rs->sr_err;
} else {
backsql_PrintErrors( bi->sql_db_env, dbh,
sth, rc );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) )
- {
- rs->sr_err = LDAP_OTHER;
- rs->sr_text = op->ora_e->e_name.bv_val;
- SQLFreeStmt( sth, SQL_DROP );
- return rs->sr_err;
- }
+ rs->sr_err = LDAP_OTHER;
}
+ rs->sr_text = op->ora_e->e_name.bv_val;
+ SQLFreeStmt( sth, SQL_DROP );
+ return rs->sr_err;
}
SQLFreeStmt( sth, SQL_DROP );
}
backsql_PrintErrors( bi->sql_db_env,
dbh, sth, rc );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- SQLFreeStmt( sth, SQL_DROP );
- rs->sr_err = LDAP_OTHER;
- rs->sr_text = "SQL-backend error";
- goto done;
- }
+ SQLFreeStmt( sth, SQL_DROP );
+ rs->sr_err = LDAP_OTHER;
+ rs->sr_text = "SQL-backend error";
+ goto done;
}
SQLFreeStmt( sth, SQL_DROP );
}
sth, rc );
SQLFreeStmt( sth, SQL_DROP );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- rs->sr_err = LDAP_OTHER;
- goto done;
- }
+ rs->sr_text = "SQL-backend error";
+ rs->sr_err = LDAP_OTHER;
+ goto done;
}
Debug( LDAP_DEBUG_TRACE,
} else {
backsql_PrintErrors( bi->sql_db_env,
dbh, sth, rc );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) )
- {
- SQLFreeStmt( sth, SQL_DROP );
- rs->sr_err = LDAP_OTHER;
- rs->sr_text = at->bam_ad->ad_cname.bv_val;
- goto done;
- }
+ SQLFreeStmt( sth, SQL_DROP );
+ rs->sr_err = LDAP_OTHER;
+ rs->sr_text = at->bam_ad->ad_cname.bv_val;
+ goto done;
}
}
SQLFreeStmt( sth, SQL_DROP );
rc = backsql_Prepare( dbh, &sth, at_rec->bam_add_proc, 0 );
if ( rc != SQL_SUCCESS ) {
-
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- return LDAP_SUCCESS;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
if ( BACKSQL_IS_ADD( at_rec->bam_expect_return ) ) {
sth, rc );
SQLFreeStmt( sth, SQL_DROP );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- return LDAP_SUCCESS;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
} else {
sth, rc );
SQLFreeStmt( sth, SQL_DROP );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- return LDAP_SUCCESS;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
currpos = pno + 2 - po;
sth, rc );
SQLFreeStmt( sth, SQL_DROP );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_text = "SQL-backend error";
- return rs->sr_err = LDAP_OTHER;
- }
-
- return LDAP_SUCCESS;
+ rs->sr_text = "SQL-backend error";
+ return rs->sr_err = LDAP_OTHER;
}
#ifdef LDAP_DEBUG
} else {
backsql_PrintErrors( bi->sql_db_env, dbh,
sth, rc );
- if ( BACKSQL_FAIL_IF_NO_MAPPING( bi ) ) {
- rs->sr_err = LDAP_OTHER;
- rs->sr_text = op->ora_e->e_name.bv_val;
- SQLFreeStmt( sth, SQL_DROP );
- return rs->sr_err;
- }
+ rs->sr_err = LDAP_OTHER;
+ rs->sr_text = op->ora_e->e_name.bv_val;
+ SQLFreeStmt( sth, SQL_DROP );
+ return rs->sr_err;
}
}
SQLFreeStmt( sth, SQL_DROP );