|
@@ -702,7 +702,7 @@ static switch_status_t switch_cache_db_execute_sql_real(switch_cache_db_handle_t
|
|
case SCDB_TYPE_ODBC:
|
|
case SCDB_TYPE_ODBC:
|
|
{
|
|
{
|
|
type = "ODBC";
|
|
type = "ODBC";
|
|
- status = switch_odbc_handle_exec(dbh->native_handle.odbc_dbh, sql, NULL, &errmsg);
|
|
|
|
|
|
+ status = switch_odbc_handle_exec(dbh->native_handle.odbc_dbh, sql, NULL, &errmsg) == SWITCH_ODBC_SUCCESS ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case SCDB_TYPE_CORE_DB:
|
|
case SCDB_TYPE_CORE_DB:
|
|
@@ -904,7 +904,7 @@ SWITCH_DECLARE(char *) switch_cache_db_execute_sql2str(switch_cache_db_handle_t
|
|
break;
|
|
break;
|
|
case SCDB_TYPE_ODBC:
|
|
case SCDB_TYPE_ODBC:
|
|
{
|
|
{
|
|
- status = switch_odbc_handle_exec_string(dbh->native_handle.odbc_dbh, sql, str, len, err);
|
|
|
|
|
|
+ status = switch_odbc_handle_exec_string(dbh->native_handle.odbc_dbh, sql, str, len, err) == SWITCH_ODBC_SUCCESS ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case SCDB_TYPE_DATABASE_INTERFACE:
|
|
case SCDB_TYPE_DATABASE_INTERFACE:
|
|
@@ -1189,7 +1189,7 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql_event_callback(switc
|
|
break;
|
|
break;
|
|
case SCDB_TYPE_ODBC:
|
|
case SCDB_TYPE_ODBC:
|
|
{
|
|
{
|
|
- status = switch_odbc_handle_callback_exec(dbh->native_handle.odbc_dbh, sql, helper_callback, &h, err);
|
|
|
|
|
|
+ status = switch_odbc_handle_callback_exec(dbh->native_handle.odbc_dbh, sql, helper_callback, &h, err) == SWITCH_ODBC_SUCCESS ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case SCDB_TYPE_CORE_DB:
|
|
case SCDB_TYPE_CORE_DB:
|
|
@@ -1248,7 +1248,7 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql_event_callback_err(s
|
|
break;
|
|
break;
|
|
case SCDB_TYPE_ODBC:
|
|
case SCDB_TYPE_ODBC:
|
|
{
|
|
{
|
|
- status = switch_odbc_handle_callback_exec(dbh->native_handle.odbc_dbh, sql, helper_callback, &h, err);
|
|
|
|
|
|
+ status = switch_odbc_handle_callback_exec(dbh->native_handle.odbc_dbh, sql, helper_callback, &h, err) == SWITCH_ODBC_SUCCESS ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
|
if (err && *err) {
|
|
if (err && *err) {
|
|
(*err_callback)(pdata, (const char*)*err);
|
|
(*err_callback)(pdata, (const char*)*err);
|
|
}
|
|
}
|
|
@@ -1305,7 +1305,7 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql_callback(switch_cach
|
|
break;
|
|
break;
|
|
case SCDB_TYPE_ODBC:
|
|
case SCDB_TYPE_ODBC:
|
|
{
|
|
{
|
|
- status = switch_odbc_handle_callback_exec(dbh->native_handle.odbc_dbh, sql, callback, pdata, err);
|
|
|
|
|
|
+ status = switch_odbc_handle_callback_exec(dbh->native_handle.odbc_dbh, sql, callback, pdata, err) == SWITCH_ODBC_SUCCESS ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case SCDB_TYPE_CORE_DB:
|
|
case SCDB_TYPE_CORE_DB:
|
|
@@ -1358,7 +1358,7 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql_callback_err(switch_
|
|
break;
|
|
break;
|
|
case SCDB_TYPE_ODBC:
|
|
case SCDB_TYPE_ODBC:
|
|
{
|
|
{
|
|
- status = switch_odbc_handle_callback_exec(dbh->native_handle.odbc_dbh, sql, callback, pdata, err);
|
|
|
|
|
|
+ status = switch_odbc_handle_callback_exec(dbh->native_handle.odbc_dbh, sql, callback, pdata, err) == SWITCH_ODBC_SUCCESS ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
|
if (err && *err) {
|
|
if (err && *err) {
|
|
(*err_callback)(pdata, (const char*)*err);
|
|
(*err_callback)(pdata, (const char*)*err);
|
|
}
|
|
}
|