下面的代码失恋数据库的:
public DataSet ExecuteDataSet(string sql)
{
OracleConnection conn = new OracleConnection("data Source=wu;user id=wu2008;password=wu2008;");
OracleDataAdapter dap = new OracleDataAdapter(sql,conn); DataSet ds = new DataSet(); dap.Fill(ds); return ds;
}
错误:
Unable to load DLL (oci.dll).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.DllNotFoundException: Unable to load DLL (oci.dll).Source Error:
Line 31: DataSet ds = new DataSet();
Line 32:
Line 33: dap.Fill(ds);
Line 34:
Line 35: return ds;我并没有引用这个oci.dll文件阿?为什么阿?
public DataSet ExecuteDataSet(string sql)
{
OracleConnection conn = new OracleConnection("data Source=wu;user id=wu2008;password=wu2008;");
OracleDataAdapter dap = new OracleDataAdapter(sql,conn); DataSet ds = new DataSet(); dap.Fill(ds); return ds;
}
错误:
Unable to load DLL (oci.dll).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.DllNotFoundException: Unable to load DLL (oci.dll).Source Error:
Line 31: DataSet ds = new DataSet();
Line 32:
Line 33: dap.Fill(ds);
Line 34:
Line 35: return ds;我并没有引用这个oci.dll文件阿?为什么阿?
改成
Provider=OraOLEDB.Oracle;User ID=***;Password=***;Data Source=****
Keyword not supported: 'provider'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Keyword not supported: 'provider'.
找到machine.config这个文件
然后再里面搜索userName="machine",把machine改为system,重新启动机器,就可以解决你的问题了
找到你数据库安装目录,点击右键,安全,选择用户"authenticated Users",然后把该用户的所有打勾的权限全部去除,再重新勾选,之后确定,再重新启动机器就可以了