积极答复者
通过Db-Library接口访问SQL Server 2005,执行insert语句后,出现部分中文字符乱码现象。

问题
-
有一应用程序通过Db-Library接口访问SQL Server 2005,执行大量的insert语句(通过dbfcmd将大量带有中文字段的insert语句放入缓冲区,然后执行dbsqlexec),命令执行成功。但是通过查询分析器去检索插入的数据,发现部分中文字符出现乱码(?符号)。大多数的中文字符都显示正常,只有个别字符出现乱码。
几点说明:
1、数据库采用的字符集/排序规则是:Chinese_PRC_BIN
2、排除乱码汉字为特殊字符的可能。因为其他记录的同一字段也有该汉字,插入成功,查询也正常。如果把乱码所在位置的汉字换成其他汉字,也一样成乱码。
3、跟通过dbfcmd放入缓冲区的命令个数有关,如果放入的命令较少就执行dbsqlexec,则不存在乱码现象。
4、该现象在SQL Server 2000上不存在。
谢谢!
答案
-
你好,
请参考Iric Wen 的回答。
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
- 已标记为答案 Molly Chen_Moderator 2012年7月23日 6:53
全部回复
-
-
你好,
请参考Iric Wen 的回答。
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
- 已标记为答案 Molly Chen_Moderator 2012年7月23日 6:53