none
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 2.112.1.0. 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");
    cxn.Open();
    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();
    adapter.Fill(ds);
    GridView1.DataSource = ds;
    GridView1.DataBind();

    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 2.112.1.0), 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