forked from w1nk/node-odbc
-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
When {call XX (?)} is spliced in the callprocedure asyncworker class, the character set in the string is not converted. ODBC needs the string of utf16, but gives the string of utf8。
code:
// create the statement to call the stored procedure using the ODBC Call escape sequence:
// need to create the string "?,?,?,?" where the number of '?' is the number of parameters;
SQLTCHAR *parameterString = new SQLTCHAR255;
for (int i = 0; i < data->parameterCount; i++) {
if (i == (data->parameterCount - 1)) {
strcat((char *)parameterString, "?"); // for last parameter, don't add ','
} else {
strcat((char *)parameterString, "?,");
}
}
data->deleteColumns(); // delete data in columns for next result set
data->sql = new SQLTCHAR[255]();
sprintf((char *)data->sql, "{ CALL %s (%s) }", combinedProcedureName, parameterString);
Metadata
Metadata
Assignees
Labels
No labels