我这个,但web服务器只能用8i,用9i就会出错string strConn = "Provider=MSDAORA.1;User ID=ysx;Data Source=exam;Password=ysx";
string strSQL = "select Power,Admin_Name,Role,School from hr.Admin where Admin_ID='" + strAdminID + "' and Password='" + strPassword + "'";OleDbConnection cn = new OleDbConnection ((String)strConn);
OleDbCommand cm = new OleDbCommand(strSQL, cn); cn.Open();
OleDbDataReader dr = cm.ExecuteReader();
if (dr.Read())
{
...
}
else
{
...
}
cn.Close();
string strSQL = "select Power,Admin_Name,Role,School from hr.Admin where Admin_ID='" + strAdminID + "' and Password='" + strPassword + "'";OleDbConnection cn = new OleDbConnection ((String)strConn);
OleDbCommand cm = new OleDbCommand(strSQL, cn); cn.Open();
OleDbDataReader dr = cm.ExecuteReader();
if (dr.Read())
{
...
}
else
{
...
}
cn.Close();
另外,有没有完整的asp.net+Oracle站点的源码
2.D:\oracle\ora92 右鍵-->屬性
-->安全-->Authenticate Users-->完全控制