Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a windows application that write with c# 4. in this windows application i get user name, password, server IP and etc from user and create a oracle connection string from this inputs and test connect to database by this code:

private OperationStatus CheckConnectToOracleDatabase(string connectionString)
{
    var oracleConnection = new OracleConnection();
    try
    {
        oracleConnection.ConnectionString = connectionString;
        oracleConnection.Open();
        oracleConnection.Close();
        return new OperationStatus { Status = true };
    }
    catch (OracleException ex)
    {

        return new OperationStatus { Status = false, ExceptionMessage = ex.Message };
    }
    catch (Exception ex)
    {
        return new OperationStatus { Status = false, ExceptionMessage = ex.Message };
    }
    finally
    {
        if (oracleConnection.State != ConnectionState.Closed)
            oracleConnection.Close();
    }
}

In my platform everything is OK and test is successful, but in the platform of customer and error was happened, this error was shown in below picture:

oracle c# error

my platform is win server 2003, and platform of customer is win 7 32bit.

share|improve this question
1  
What is origin of OracleConnection class? Is it from ODAC (Oracle Direct Access Control)? –  Dmitry Bychenko Jul 20 '13 at 13:06
    
Unless I'm mistaken, wouldn't c#4 be running on clr 4.0.30319? –  spender Jul 20 '13 at 13:08
    
ODP.net is installed during installing oracle –  Pezhman Parsaee Jul 20 '13 at 13:08
    
@spender, I don't know yet, because customer is in the other place and communicate with it via phone –  Pezhman Parsaee Jul 20 '13 at 13:11
    
@PezhmanParsaee: Does customer have .Net4 installed? –  spender Jul 20 '13 at 13:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.