为什么总是那样 各位看看把 快把人急死了
错误信息:
Server Error in '/xianxue' Application.
--------------------------------------------------------------------------------
ORA-12154: TNS:could not resolve service name
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.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name
Source Error:
Line 100: OleDbDataAdapter objadapter = new OleDbDataAdapter(sqlstr,myConnection);
Line 101: DataSet ds = new DataSet();
Line 102: objadapter.Fill(ds,"gonggao");
Line 103: DataTable dt=new DataTable();
Line 104: dt=ds.Tables["gonggao"];
Source File: C:\Inetpub\wwwroot\xianxue\index.aspx.cs Line: 102
Stack Trace:
[OleDbException (0x80004005): ORA-12154: TNS:could not resolve service name]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
index.WebForm1.Grid1Bind() in C:\Inetpub\wwwroot\xianxue\index.aspx.cs:102
index.WebForm1.PageInit() in C:\Inetpub\wwwroot\xianxue\index.aspx.cs:89
index.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\xianxue\index.aspx.cs:43
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573