当使用ole db方式与ms sql server连接时,如果数据库的代码页与本地的不同,当进行查询时字符的返回值就会变成 ? 或是乱码, 微软的网站上说这是一个bug, 并且描述如下: when you try to retrieve character data from a column with different collation than the client code page in microsoft sql ole db provider (sqloledb), you may receive question marks (??) instead of correct data when all the following conditions are true: •a connection is made against a microsoft sql server 2000 database. •ssprop_init_autotranslate is set to true. ssprop_init_autotranslate is part of the provider-specific dbpropset_sqlserverdbinit property set. •a column is bound to an oledb dbtype_wchar data type in the bindings structure.