我想可以通过修改数据库的排序规则:
看看现在是Chinese_Taiwan_Stroke_CI_AS,
还是Chinese_PRC_CI_AS,
再改成你想要的,
试试看修改数据库的排序规则:
select distinct collationid from dbo.syscolumns
select * from dbo.syscolumns where collationid=53251 --Chinese_Taiwan_Stroke_CI_AS
select * from dbo.syscolumns where collationid=53284 --Chinese_PRC_CI_AS
EXEC sp_configure 'allow updates',1 RECONFIGURE WITH OVERRIDE
update dbo.syscolumns set collationid=53284 where collationid=53251
EXEC sp_configure 'allow updates',0 RECONFIGURE WITH OVERRIDE
go
看看现在是Chinese_Taiwan_Stroke_CI_AS,
还是Chinese_PRC_CI_AS,
再改成你想要的,
试试看修改数据库的排序规则:
select distinct collationid from dbo.syscolumns
select * from dbo.syscolumns where collationid=53251 --Chinese_Taiwan_Stroke_CI_AS
select * from dbo.syscolumns where collationid=53284 --Chinese_PRC_CI_AS
EXEC sp_configure 'allow updates',1 RECONFIGURE WITH OVERRIDE
update dbo.syscolumns set collationid=53284 where collationid=53251
EXEC sp_configure 'allow updates',0 RECONFIGURE WITH OVERRIDE
go
select distinct collationid from dbo.syscolumns
select * from dbo.syscolumns where collationid=53251 --Chinese_Taiwan_Stroke_CI_AS
select * from dbo.syscolumns where collationid=53284 --Chinese_PRC_CI_AS出现了如下错误:
服务器: 消息 207,级别 16,状态 3,行 1
Invalid column name 'collationid'.
varchar --> nvarchar
char --> nchar
text --> ntexthttp://www.csdn.net/develop/Read_Article.asp?Id=22193
我这里是 SQL 2000 Enterprise Edition里而的字符串都是 nvarchar这里里执行没问题呀,
我也不知为什么我自己程序中的简繁体数据库都是这样转换的