locked
DbTransaction issue with Oracle RRS feed

  • Question

  • User-1322853079 posted

    Hi Everybody,

    We are using the Microsoft Enterprise Library for connection to the database .  I have a peculiar problem when connection to oracle

    in one of the case like when i am using the DbTransaction to fetch the DataSet.  The Code i have written is as follows

    DataBase dbInstance = DatabaseFactory.CreateDatabase()

    DataSet ds = dbInstance.ExecuteDataSet(transaction,CommandType.Text,commandText);

    here transaction is DbTransaction and commandText is query

    and the error can be seen at the below of this writing.

     The other thing i have observed is this method is working fine when connecting to Sql Server.

     If  anybody knows the solution ,please help me in this regard. This error is occuured only when DbTransaction overload is

    used to fetch the DataSet.

    Waiting for your solutions......

     G Suresh Kumar

    ORA-01005: null password given; logon denied

    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.OracleClient.OracleException: ORA-01005: null password given; logon denied


    Source Error:

    Line 183:		public DataSet ExecuteDataset(DbTransaction transaction, CommandType  commandType, string commandText)
    Line 184:		{				
    Line 185:			return dbInstance.ExecuteDataSet(transaction,CommandType.Text,commandText);  			            
    Line 186:		}
    Line 187:


    Source File: E:\Projects\EFC\CoreLib\EnterpriseDAL\DAL.cs    Line: 185

    Stack Trace:

    [OracleException (0x80131938): ORA-01005: null password given; logon denied
    ]
       System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc) +83
       System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) +682
       System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) +132
       System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +36
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +68
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +521
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +104
       System.Data.OracleClient.OracleConnection.Open() +37
       System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
       Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames) +1122
       Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames, DbTransaction transaction) +50
       Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames, DbTransaction transaction) +71
       Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String tableName, DbTransaction transaction) +72
       Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command, DbTransaction transaction) +132
    
    [DBException: Error occured while executing the storedprocedure]
       Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command, DbTransaction transaction) +429
       Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.ExecuteDataSet(DbCommand command, DbTransaction transaction) +73
       Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbTransaction transaction, CommandType commandType, String commandText) +122
    
    

      


     

     

     

     

     

     

     

     

     

     

     

      

    Friday, November 16, 2007 7:52 AM

Answers

  • User-1322853079 posted

    hi,

    Everything is correct, it is working fine for other overloads.

    i.e it is working fine for the methods which are not using Dbtransaction as paramter

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 17, 2007 3:39 AM

All replies

  • User-1355649840 posted

     Rule #1: Believe the error message.

     Did you check your login credentials in web.config (or app.config)?
     

    Friday, November 16, 2007 8:29 AM
  • User-1322853079 posted

    hi,

    Everything is correct, it is working fine for other overloads.

    i.e it is working fine for the methods which are not using Dbtransaction as paramter

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 17, 2007 3:39 AM
  • User-1322853079 posted

    hi,

    Everything is correct, it is working fine for other overloads.

    i.e it is working fine for the methods which are not using Dbtransaction as parameter

    Saturday, November 17, 2007 3:39 AM