Skip to content

Commit

Permalink
db, feat: support more dara type.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed May 20, 2021
1 parent 205d76a commit e795200
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fibjs/src/db/odbc/Odbc.cpp
Expand Up @@ -16,6 +16,8 @@
#include <stdio.h>
#include <stdlib.h>

#define SQL_SS_VARIANT (-150)

namespace fibjs {

void* g_odbc;
Expand Down Expand Up @@ -332,7 +334,10 @@ result_t odbc_execute(void* conn, exlib::string sql, obj_ptr<NArray>& retVal, As
v = new Buffer(value);
break;
}
case -9: {
case SQL_WCHAR:
case SQL_WVARCHAR:
case SQL_WLONGVARCHAR:
case SQL_SS_VARIANT: {
exlib::wstring value;
hr = SQLGetData(stmt, i + 1, SQL_C_WCHAR, value.c_buffer(), 2, &len);
if (hr < 0)
Expand Down

0 comments on commit e795200

Please sign in to comment.