EddieIT
asked on
Issue Exporting Chinese characters using sp_OAMethod
Hello Experts, I have a stored procedure exporting pipe delimited files using
"EXECUTE @hr = sp_OAMethod @objFileSystem , 'OpenTextFile' , @objTextStream OUT , @FileAndPath,8,true"
The fields are declares as nvarchar(max), but data is not exporting. When I declare fields as VARCHAR, the data exports, however the Chinese characters come out as "?????"
Please let me know if you have a solution to the issue.
"EXECUTE @hr = sp_OAMethod @objFileSystem , 'OpenTextFile' , @objTextStream OUT , @FileAndPath,8,true"
The fields are declares as nvarchar(max), but data is not exporting. When I declare fields as VARCHAR, the data exports, however the Chinese characters come out as "?????"
Please let me know if you have a solution to the issue.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
EddieIT, do you still need help with this question?
Open in new window
However, if you try to pass a Chinese literal as '李杰' instead of N'李杰' it will turn into '??'.http://bit.ly/1h4A0jT