pdd and FSCORE-127

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8571 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West committed 2008-05-24 02:03:16 +00:00
1 parent 85d9fde44f
commit 9838aa4e00
2 files changed
+13 -8

No files matched your search

+8 -2
View File
@@ -144,8 +144,14 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_connect(switch_odbc_hand
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connecting %s\n", handle->dsn);
result = SQLConnect(handle->con, (SQLCHAR *) handle->dsn, SQL_NTS, (SQLCHAR *) handle->username, SQL_NTS, (SQLCHAR *) handle->password, SQL_NTS);
if(!strstr(handle->dsn, "DRIVER")) {
result = SQLConnect(handle->con, (SQLCHAR *) handle->dsn, SQL_NTS, (SQLCHAR *) handle->username, SQL_NTS, (SQLCHAR *) handle->password, SQL_NTS);
} else {
SQLCHAR outstr[1024] = {0};
SQLSMALLINT outstrlen = 0;
result = SQLDriverConnect(handle->con, NULL, (SQLCHAR *) handle->dsn, strlen(handle->dsn), outstr, sizeof(outstr), &outstrlen, SQL_DRIVER_NOPROMPT);
}
if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
char *err_str;
if ((err_str = switch_odbc_handle_get_error(handle, NULL))) {