当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > 怎样解决thephile中的数据库由于排序造成的问题:对 text 数据类型不支持代码页转...

ASP.NET
asp.net DiscuzNT登录,退出的代码
ASP .NET中执行控件(如ImageButton、LinkButton等)命令不刷新页面
Microsoft SQL Server 2005 Express 远程访问设置详述,100%成功篇
使用.NET命令行编译器编译项目(如ASP.NET、C#等)
asp.net 去除viewstate
asp.net repeater实现批量删除
asp.net安全、实用、简单的大容量存储过程分页
asp.net 获取图片高度和宽度实例代码
在GridView中LinkButton的属性的应用(如何不用选中就删除这一行)
关于.net(C#)中的跨进程访问的问题
asp.net request.PathInfo实现的url重写
asp.net SqlDataReader绑定Repeater
ASP.NET 动态写入服务器端控件
Discuz .net版本中的短消息系统
asp.net动态加载用户控件,关于后台添加、修改的思考
.net Cookies安全性实践分析
配置Visual Studio 以调试.net framework源代码
asp.net 大文件上传 之 改版了的SlickUpload.HttpUploadModule(Krystalware.SlickUpload.dll)
asp.net Web站点风格切换的实现
asp.net 用户控件中图片及样式问题

ASP.NET 中的 怎样解决thephile中的数据库由于排序造成的问题:对 text 数据类型不支持代码页转...


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 85 ::
收藏到网摘: n/a


怎样解决thephile中的数据库由于排序造成的问题:对 text 数据类型不支持代码页转换。从: 1252 到: 936
------------------------------------------------------------
问题:
最近我在看《Asp.net Web站点高级编程 提出问题-设计方案-解决方案》的论坛部分,在调试Topic.aspx页面时,出现如下错误:
The error occurred in:
http://localhost/ThePhileVB/WebModules/Forums/Topic.aspx?TopicId=50
Error Message:
对 text 数据类型不支持代码页转换。从: 1252 到: 936。
Error Stack:
System.Data.SqlClient.SqlException: 对 text 数据类型不支持代码页转换。从: 1252 到: 936。
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String src/DownloadFiles\a\2004-09-20\Table, IDbCommand command, CommandBehavior behavior)

...(以下略)
-------------------------------------------------------------
该问题是由于设计标的时候,原数据库采用的是:
英语(美国) 0x409 Latin1_General 1252
而由于操作系统的缘故,我们需要的是
简体中文(中华人民共和国) 0x804 Chinese_PRC 936 ,
1.生成两个不同的数据库,thePhile,thePhileTemp,从backup文件中还原数据;生成thephile的sql脚本;删掉thephile中的所有用户表。
2.把脚本中的
COLLATE SQL_Latin1_General_CP1_CI_AS改成
COLLATE Chinese_PRC_CI_AS
3.利用sql脚本重新生成thephile中的表;
利用sqlserver中的工具,从thePhileTemp中导出数据,导入到thePhile中ok