none
Running an exe created using C# from Scheduled Tasks RRS feed

  • Question

  • Hi all

     

    I have created a C# application which loads data into a ORACLE database. The exe is hosted in Windows 2000 server. The exe when executed manually runs properly. When the exe is scheduled using Windows scheduler it fails to connect to ORACLE database. The error message is shown below

     

      at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
       at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
       at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.Odbc.OdbcConnection.Open()
       at HpdDaily.HpdhelpdeskDaily.Main() in C:\Documents and Settings\ctvks000\Desktop\chandar\projects\hpd_helpdesk_daily_patch\HPD_HELPDESK_DAILY.cs:line 141
    ERROR [IM004] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

    Any suggestions for solving this issue ?

     

    With Regards

    Chandar

    Tuesday, July 17, 2007 11:56 AM

All replies

  • I'm not an Oracle guy (at all), so please forgive me if my question is ignorant...  How are you connecting to the database: username/password or the login credentials of the current user?
    Wednesday, July 18, 2007 12:40 AM