change types for odbc
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6102 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0c09642bf9
commit
fc1209a548
|
@ -1885,11 +1885,11 @@ static char *sofia_glue_execute_sql2str_odbc(sofia_profile_t *profile, switch_mu
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
SQLHSTMT stmt;
|
SQLHSTMT stmt;
|
||||||
SQLCHAR name[1024];
|
SQLCHAR name[1024];
|
||||||
SQLINTEGER m = 0;
|
SQLLEN m = 0;
|
||||||
|
|
||||||
if (switch_odbc_handle_exec(profile->master_odbc, sql, &stmt) == SWITCH_ODBC_SUCCESS) {
|
if (switch_odbc_handle_exec(profile->master_odbc, sql, &stmt) == SWITCH_ODBC_SUCCESS) {
|
||||||
SQLSMALLINT NameLength, DataType, DecimalDigits, Nullable;
|
SQLSMALLINT NameLength, DataType, DecimalDigits, Nullable;
|
||||||
SQLUINTEGER ColumnSize;
|
SQLULEN ColumnSize;
|
||||||
SQLRowCount(stmt, &m);
|
SQLRowCount(stmt, &m);
|
||||||
|
|
||||||
if (m <= 0) {
|
if (m <= 0) {
|
||||||
|
@ -1901,7 +1901,7 @@ static char *sofia_glue_execute_sql2str_odbc(sofia_profile_t *profile, switch_mu
|
||||||
}
|
}
|
||||||
|
|
||||||
SQLDescribeCol(stmt, 1, name, sizeof(name), &NameLength, &DataType, &ColumnSize, &DecimalDigits, &Nullable);
|
SQLDescribeCol(stmt, 1, name, sizeof(name), &NameLength, &DataType, &ColumnSize, &DecimalDigits, &Nullable);
|
||||||
SQLGetData(stmt, 1, SQL_C_CHAR, (SQLCHAR *)resbuf, (SQLINTEGER)len, NULL);
|
SQLGetData(stmt, 1, SQL_C_CHAR, (SQLCHAR *)resbuf, (SQLLEN)len, NULL);
|
||||||
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
|
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
|
||||||
ret = resbuf;
|
ret = resbuf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue