W
wei
i tested database connection to oracle. the code worked on windows
application but didn't work on web application. the code is as following:
OleDbDataAdapter DataAdapter = new OleDbDataAdapter(commandString,
connectionString);
DataSet dataSet = new DataSet( );
// fill the data set object
DataAdapter.Fill(dataSet,dataSetName);
// Get the one table from the DataSet
DataTable dataTable = dataSet.Tables[0];
return dataTable;
codes in two application are exactly same. when run web application, it
stopped at DataAdapter.Fill(dataSet,dataSetName) and gave an exception
message of:
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
did i miss something?
thank you for any help.
application but didn't work on web application. the code is as following:
OleDbDataAdapter DataAdapter = new OleDbDataAdapter(commandString,
connectionString);
DataSet dataSet = new DataSet( );
// fill the data set object
DataAdapter.Fill(dataSet,dataSetName);
// Get the one table from the DataSet
DataTable dataTable = dataSet.Tables[0];
return dataTable;
codes in two application are exactly same. when run web application, it
stopped at DataAdapter.Fill(dataSet,dataSetName) and gave an exception
message of:
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
did i miss something?
thank you for any help.