VS2010访问 oracle数据库的例子(EMP表)

时间:2016-06-28 02:25:14
【文件属性】:

文件名称:VS2010访问 oracle数据库的例子(EMP表)

文件大小:1KB

文件格式:TXT

更新时间:2016-06-28 02:25:14

vs2010 oracle

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.OracleClient; using System.Data.Odbc; public partial class data : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { OracleConnection myconnection = new OracleConnection(" Data Source=ORCL;Persist Security Info=True;User ID=SCOTT;Password=tiger;Unicode=True"); myconnection.Open(); string sql = "select * from emp"; OracleCommand mycommand = new OracleCommand(sql, myconnection); OracleDataReader myReader; myReader = mycommand.ExecuteReader(); Response.Write("进入oracle自带emp表查询结果为"); Response.Write("

"); Response.Write("");


网友评论

  • 适合初者,有参考价值
  • 虽然不是太好但是里面的还是有参考价值
  • 正在学习oracle和pl/sql,已经入门,谢谢分享。