The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEn

Discussion in 'Microsoft Dot NET' started by sudhaoncyberworld@gmail.com, Jul 16, 2007.

  1. Guest

    Dear Techies,

    I do have small issue on connecting oracle server [odbc connection]
    from .net [MOSS 2007 webpart]

    This is the code snippet


    public string strConString = "Driver={Microsoft ODBC for
    Oracle};Server=myserver;Uid=system;Pwd=mypwd;";


    using (OdbcConnection odbcCon = new OdbcConnection(strConString))
    {
    odbcCon.Open();
    strOrclCmd = " select * from customers";
    OdbcDataAdapter odbcDA = new
    OdbcDataAdapter(strOrclCmd, odbcCon);
    DataSet ds = new DataSet();
    odbcDA.Fill(ds);
    return ds;
    }

    The above which is perfectly working fine with a console application.

    The same code I have used in
    System.Web.UI.WebControls.WebParts.WebPart which throws the below
    exception....

    System.Data.Odbc.OdbcException: ERROR [NA000] [Microsoft][ODBC driver
    for Oracle][Oracle]ORA-12638: Credential retrieval failed
    ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
    SQLSetConnectAttr failed
    ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't
    support the version of ODBC behavior that the application requested
    (see SQLSetEnvAttr).
    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 DMPDBLayer.Customer.GetCustomers()

    When I deploy the wep part in the sharepoint site through GAC, it
    throws the above error. Can anyone figure out which is going wrong?

    Working Environment
    Windows server 2003
    VS 2005
    Framework 3.0 & 2.0
    MOSS 2007
     
    , Jul 16, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom
    Replies:
    6
    Views:
    532
    Richard L Rosenheim
    Jan 13, 2005
  2. Guest
    Replies:
    4
    Views:
    4,529
    maxmann
    Mar 8, 2007
  3. Replies:
    0
    Views:
    504
  4. Replies:
    0
    Views:
    622
  5. pg
    Replies:
    11
    Views:
    882
    PA Bear [MS MVP]
    Feb 9, 2008
Loading...

Share This Page