vs2008中怎样用代码连接oracle在gridview中显示呢? 20
2个回答
展开全部
OracleConnection cn = new OracleConnection("Data Source=ORACLE实例名;User Id=用户名;Password=密码");
cn.Open();
using (OracleCommand cmd = new OracleCommand("SELECT * from 表名"), cn))
{
this.GridView1.DataSource = cmd.ExecuteReader(CommandBehavior.CloseConnection);
this.GridView1.DataBind();
}
cn.Open();
using (OracleCommand cmd = new OracleCommand("SELECT * from 表名"), cn))
{
this.GridView1.DataSource = cmd.ExecuteReader(CommandBehavior.CloseConnection);
this.GridView1.DataBind();
}
来自:求助得到的回答
2010-04-02
展开全部
<appSettings>
<add key="ORCLDBOLE" value="Data Source=localhost/orcl;User ID=****;Password=****;Unicode=True;"/>
</appSettings>
<add key="ORCLDBOLE" value="Data Source=localhost/orcl;User ID=****;Password=****;Unicode=True;"/>
</appSettings>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询