1. 首页
  2. 编程语言
  3. C++ 
  4. VS2010访问 oracle数据库的例子(EMP表)

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

上传者: 2018-12-07 15:34:47上传 TXT文件 1.39KB 热度 42次
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("");
用户评论
码姐姐匿名网友 2018-12-07 15:34:47

适合初者,有参考价值

码姐姐匿名网友 2018-12-07 15:34:47

虽然不是太好但是里面的还是有参考价值

码姐姐匿名网友 2018-12-07 15:34:47

正在学习oracle和pl/sql,已经入门,谢谢分享。