文件名称: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("