我在ASP.net中连接Oracle数据库,在页面显示乱码?

jjyzhw111 2003-07-24 08:52:55
我在ASP.net中连接Oracle数据库,从数据表中提出来的数据在页面显示乱码。为何,请help.谢谢!
...全文
97 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
visualcpu 2003-07-24
  • 打赏
  • 举报
回复
no try

help you up
snla 2003-07-24
  • 打赏
  • 举报
回复
代码没什么问题呀!
ahking 2003-07-24
  • 打赏
  • 举报
回复
可能需要修改注册表:
hkey-localmachine-software-oracle-nls改成American_America.us7ascII
home0下也一样
airon2002 2003-07-24
  • 打赏
  • 举报
回复
在HTML中放入:
<META http-equiv=Content-Type content="text/html; charset=gb2312">

就可以了
jjyzhw111 2003-07-24
  • 打赏
  • 举报
回复
sorry,不行,我用TextBox中显示的。help me.thanks
-----------------------------------
name_p.Text=Request.QueryString["agt_num"];
OracleConnection myconnection=new OracleConnection(strcon);
string mysele="select * from agent where agt_code='"+Request.QueryString["agt_num"]+"'";
OracleCommand mycommand=new OracleCommand(mysele,myconnection);
myconnection.Open();
OracleDataReader dr;
dr=mycommand.ExecuteReader();
if(dr.Read())
{
code.Text=dr["agt_code"].ToString();
c_name.Text=dr[1].ToString();
person.Text=dr[4].ToString();
Label2.Text=dr[1].ToString();
}
saucer 2003-07-24
  • 打赏
  • 举报
回复
how did you display the 数据 ? try to modify your web.config

<configuration>
<system.web>
<globalization requestEncoding="GB2312" responseEncoding="GB2312" uiCulture="zh-CN" culture="zh-CN" fileEncoding="GB2312" />
</system.web>
</configuration>

62,243

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧