ODP.NET upgrade 10i to 11G RRS feed

  • General discussion

  • We are upgrading our databases from 10i to 11gR2. We have some ASP.NET VS2008 web apps running against those databases. In 10i, we are refering the Oracle.DataAccess.dll version1.102.4.0, Now with the upgrade of database, we start to refering Oracle.DataAccess.dll version But end results is surprising.
    The my code is something like this

    System.Data.IDbConnection cxn = new Oracle.DataAccess.Client.OracleConnection("Data Source=Northwind;User Id=User;Password=Password");
    System.Data.IDbDataAdapter adapter = new Oracle.DataAccess.Client.OracleDataAdapter();
    System.Data.IDbCommand cmd = cxn.CreateCommand();
    (cmd as Oracle.DataAccess.Client.OracleCommand).BindByName = true;
    (cmd as Oracle.DataAccess.Client.OracleCommand).FetchSize = 300000;
    cmd.CommandType = CommandType.Text;
    cmd.CommandText = "SELECT Id, FirstName, LastName, Login, Pwd, PwdDate, Email, IdProfil FROM Contact ORDER BY FirstName,LastName";
    cmd.CommandTimeout = 30;
    adapter.SelectCommand = cmd;
    System.Data.DataSet ds = new System.Data.DataSet();
    GridView1.DataSource = ds;

    In this code I found that if I remove (cmd as Oracle.DataAccess.Client.OracleCommand).FetchSize = 300000; , then code runs fine with both versions of DLL. Otherwise if I put the above line in code and add reference of Oracle.DataAccess.DLL (version, results are unexpected; Id, TimeStamp columns are not consistent with the table values.

    • Edited by t_deepak Tuesday, October 4, 2011 11:25 AM
    Monday, October 3, 2011 11:09 AM

All replies