- dbc = backsql_open_db_conn( si, ldapc->c_connid );
- }
-
- if ( !dbc ) {
- Debug( LDAP_DEBUG_TRACE, "backsql_get_db_conn(): "
- "could not get connection handle -- returning NULL\n",
- 0, 0, 0 );
- return SQL_NULL_HDBC;
+ rc = backsql_open_db_conn( si, ldapc->c_connid, &dbc );
+ if ( rc != LDAP_SUCCESS) {
+ Debug( LDAP_DEBUG_TRACE, "backsql_get_db_conn(): "
+ "could not get connection handle "
+ "-- returning NULL\n", 0, 0, 0 );
+ return rc;
+ }