freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Van Shuka" <vanshuka AT gmail.com>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] unicode support (chinese)
- Date: Sun, 3 Aug 2008 17:09:15 +0300
Hello,
I'm working on CentOS 5.2
and connecting(sadly) to MS SQL Server 2005 with unixODBC+FreeTDS 0.82
The data i need to insert/select is unicode chinese characters (like 0x4e2d)
into nvarchar(50) field.
SQLINTEGER chineseCharInd;
SQLWCHAR chineseChar[3]={0};
chineseChar[0] = 0x4e2d;
chineseChar[1] = 0x5152;
chineseChar[2] = 0;
However binding this parameter with:
sqlError = SQLBindParameter(sqlStmt, 1, SQL_PARAM_INPUT,
SQL_C_WCHAR, SQL_WVARCHAR, 50, 0,
&chineseChar, sizeof(chineseChar), &chineseCharInd);
I'm getting the error state=HY004, [FreeTDS][SQL Server]Invalid data type
And when I'm trying to select data using
sqlError =
SQLBindCol(sqlSelectStmt,1,SQL_C_WCHAR,sqlName,sizeof(sqlName),&ValNameInd);
I'm getting the error:
state=HY003 [FreeTDS][SQL Server]Program type out of range.
(The same code runs on XP correctly).
Is there anything I'm missing?
Appreciate your help.
Van
-
[freetds] unicode support (chinese),
Van Shuka, 08/03/2008
- Re: [freetds] unicode support (chinese), James K. Lowden, 08/04/2008
Archive powered by MHonArc 2.6.24.