OracleDataAdapter.Fill Is Slow

All,
Can anyone help me understand why the call to oda.Fill in this function is so slow, about 8 to 10 seconds? If I execute the same SQL in Toad, it executes reliably about 500 milliseconds. I'm using Oracle.DataAccess v4.
Public Shared Function Get24() As Data.DataTable
Dim EndDT As Date = Now
Dim StartDT As Date = EndDT.AddHours(-24)
Dim sb As New System.Text.StringBuilder
sb.Append("SELECT TO_TIMESTAMP(TO_CHAR(completed_time,'DD/MM/YY HH:MI:SS PM'),'DD/MM/YY HH:MI:SS PM') || TO_TIMESTAMP(TO_CHAR(rejected_time,'DD/MM/YY HH:MI:SS PM'),'DD/MM/YY HH:MI:SS PM') As DTS," & Space)
sb.Append("DECODE(mes_srno_status,'03',0,'04',1) AS VALS," & Space)
sb.Append("MES_ASSY_JOB_INFO.*" & Space)
sb.Append("FROM MES_ASSY_JOB_INFO" & Space)
sb.Append("WHERE" & Space)
sb.Append("mes_srno_status IN ('03','04')" & Space)
sb.Append("AND TO_TIMESTAMP(TO_CHAR(completed_time,'DD/MM/YY HH:MI:SS PM'),'DD/MM/YY HH:MI:SS PM')" & Space)
sb.Append("|| TO_TIMESTAMP(TO_CHAR(rejected_time,'DD/MM/YY HH:MI:SS PM'),'DD/MM/YY HH:MI:SS PM')" & Space)
sb.Append("BETWEEN :StartDate AND :EndDate" & Space)
Using oc As New OracleCommand(sb.ToString, DAL.ODP.GetConnectionPMESDB)
Dim p1 As New OracleParameter("StartDate", OracleDbType.TimeStamp, StartDT, ParameterDirection.Input)
Dim p2 As New OracleParameter("EndDate", OracleDbType.TimeStamp, EndDT, ParameterDirection.Input)
oc.Parameters.Add(p1)
oc.Parameters.Add(p2)
Using oda As New Oracle.DataAccess.Client.OracleDataAdapter(oc)
Dim tempDT As New Data.DataTable
oda.Fill(tempDT)
Dim dt As New Data.DataTable
Dim dc As DataColumnCollection = tempDT.Columns
For Each c As Data.DataColumn In dc
dt.Columns.Add(c.ColumnName, c.DataType)
Next
dt.Columns(0).DataType = GetType(Date)
For Each dr As Data.DataRow In tempDT.Rows
Dim dr1 As Data.DataRow = dt.Rows.Add
Dim d As Date = Oracle.DataAccess.Types.OracleTimeStamp.Parse(dr(0))
dr1(0) = d
For i As Integer = 1 To dr.Table.Columns.Count - 1
dr1(i) = dr(i)
Next
Next
Return dt
End Using
End Using
End Function
The string builder produces the following SQL:
SELECT TO_TIMESTAMP(TO_CHAR(completed_time,'DD/MM/YY HH:MI:SS PM'),'DD/MM/YY HH:MI:SS PM')
|| TO_TIMESTAMP(TO_CHAR(rejected_time,'DD/MM/YY HH:MI:SS PM'),'DD/MM/YY HH:MI:SS PM') AS DTS,
DECODE(mes_srno_status,'03',0,'04',1) AS VALS,
MES_ASSY_JOB_INFO.*
FROM MES_ASSY_JOB_INFO
WHERE mes_srno_status IN ('03','04')
AND TO_TIMESTAMP(TO_CHAR(completed_time,'DD/MM/YY HH:MI:SS PM'),'DD/MM/YY HH:MI:SS PM')
|| TO_TIMESTAMP(TO_CHAR(rejected_time,'DD/MM/YY HH:MI:SS PM'),'DD/MM/YY HH:MI:SS PM') BETWEEN :StartDate AND :EndDate

Is it the Fill method that is slow or something else, such as creating the connection pool? It would be easier to diagnose what the potential problem could be if we know which API calls are operating inordinately slowly.

Similar Messages

  • OracleDataAdapter.fill cause ArgumentOutOfRangeException

    We have data that is saved by a Oracle Forms application. This data includes a Date field for the time the data was last saved. If I try to read this data into a DataTable, a call to the OracleDataAdapter.Fill method causes an ArgumentOutOfRangeException.
    "Year, Month, and Day parameters describe an un-representable DateTime."
    at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
    at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second)
    at Oracle.DataAccess.Client.OracleDataReader.GetValue(Object[] values)
    Looking at the data with Oracle Developer I noticed something interesting. The raw view of the date saved from the Forms app differs from a date saved from Developer or a .NET app.
    select dump(savedate), to_char(savedate, 'ddmmyyyy hh24miss') from xxxTable;
    Typ=12 Len=7: 80,86,1,9,17,13,4          09012014 161203
    Typ=12 Len=7: 120,114,1,9,17,13,4     09012014 161203
    The former is a date saved from the Forms app. The latter is a date saved from Developer/.NET app. Yet Developer seems to know how to format both. Is this a bug in the database, or in the OracleDataAdapter or in Oracle Forms, or in our code?
    Oracle.DataAccess.dll     v.2.102.2.20

    Well, turns out the erroneous date have a negative year, i.e. BC. I referred this to our Oracle Forms devs.
    The way Oracle stores date internally is like this.
    Jan. 1st, 2014 16:12:03
    Typ=12 Len=7: 120,114,1,9,17,13,4     09012014 161203
    120 - 100 = 20
    114 - 100 = 14
    ==> year 2014
    1 ==> January
    9 ==> 1st
    17 - 1 = 16
    13 - 1 = 12
    4 - 1 = 03
    If you do the same to the erroneous date, the year is negative.
    80 - 100 = -20
    86 - 100 = -14
    ==> -2014 or 2014 BC
    I consider it a bit of a faux-pas that Oracle Developer's default formatting doesn't use SYYYY (S being the negative/positive sign).
    EDIT.
    You can also change the date formatting in Oracle Developer from Tools > Preferences > Database > NLS.

  • OracleDataAdapter.Fill() slow while running in development enviornment

    I have found a potential issue with the OracleDataAapter where it runs slow during a Fill() execution under the following scenario:
    1) ODP.NET Version 10.1.0.400
    2) Visual Studio Framework Version 1.1
    3) Select command is a simple "SELECT * FROM <TABLE>" where some of the columns returned contain null values
    Under this scenario, the fill operation is slow and my CPU is pegged at 100% when running inside of the Visual Studio development environment. If I run it outside the development environment (CTRL-F5) it is not slow and runs fine.
    What I have found it the Oracle.DataAccess component is throwing an internal exception whenever it encounters a null value. The error can be obtained by changing Visual Studio to break into the debugger for all CLR exceptions (Debug Menu --> Exceptions). Here is the error being thrown:
    A first change exception of type 'System.InvalidCastException' occurred in oracle.dataaccess.dll
    Additional information: Column contains NULL data
    I can reproduce this problem with three lines of code:
    1. DataSet dataSet = new DataSet("SAMPLE");
    2. OracleDataAdapter adapter = new OracleDataAdapter("SELECT * FROM MYTABLE", "Data Source=MYDB.WORLD;User Id=my_user;Password=my_pwd");
    3. adapter.Fill(dataSet);
    I have seen other posts from people experiencing a similar problem, but not a resolution. Does anyone know if there is a resolution to this issue or is this a bug in the ODP library? Any help would be greatly appreciated.
    Thanks!
    Ross

    Well, I tried to open a TAR but don't seem to have ODP.NET anywhere in the product list. Interesting (perhaps) is that my test case runs in about 8 secs using the MS provider and something like 176 seconds using ODP.NET 10.1.0.4.0 and Oracle Client 10.1.0.4.0 on my low-end test machine. Here's my simple test case using the SH demo schema:
    using System;
    using System.Data;
    // using System.Data.OracleClient;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace DataAdapterTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          int tickStart = 0;
          int tickEnd = 0;
          string constr = "User Id=sh; Password=sh; Pooling=false";
          OracleConnection con = new OracleConnection(constr);
          con.Open();
          DataSet ds = new DataSet();
          OracleDataAdapter da = new OracleDataAdapter("select * from customers", con);
          tickStart = Environment.TickCount;
          da.Fill(ds);
          tickEnd = Environment.TickCount;
          Console.WriteLine("Total Ticks: {0}", tickEnd - tickStart);
          da.Dispose();
          ds.Dispose();
          con.Dispose();
    }- Mark

  • OracleDataAdapter.Fill returns incorrect data for small numbers.

    Hi All,
    Recently we moved to Oracle client 11.1.0.7.20 with ODP.NET and instant client.
    And we encountered the following issue.
    When FetchSize of the command is set to any value that differs from default for some number fields with size <5 incorrect values are returned.
    I used the following code to reproduce the issue:
    var query = "SELECT * FROM RT ORDER BY ID";
    var connectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=server)(PORT=1531)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test)));User Id=user;Password=password;";
    var column = "IS_LEAF"; // data type is NUMBER(1, 0)
    using (var connection = new OracleConnection(connectionString))
    using (var cmd1 = connection.CreateCommand())
    using (var cmd2 = connection.CreateCommand())
    cmd1.CommandText = query;
    cmd2.CommandText = query;
    cmd2.FetchSize = 512*1024; // 512K
    var adapter1 = new OracleDataAdapter(cmd1);
    var table1 = new DataTable();
    adapter1.Fill(table1);
    var adapter2 = new OracleDataAdapter(cmd2);
    var table2 = new DataTable();
    adapter2.Fill(table2);
    for (int i = 0; i < table1.Rows.Count; i++)
    var row1 = table1.Rows;
    var row2 = table2.Rows[i];
    if (!object.Equals(row1[column], row2[column]))
    Console.WriteLine(string.Format("values don't match: {0}, {1}", row1[column], row2[column]));
    there are some ouput lines:
    values don't match: 0, 3328
    values don't match: 0, 3
    values don't match: 1, 3
    values don't match: 0, 318
    values don't match: 0, 264
    values don't match: 1, 10280
    values don't match: 1, 842
    values don't match: 1, 7184
    The column type is NUMBER(1, 0) and only values in the database are 1 or 0. So as you can see most of the values filled with custom fetch size are totally incorrect.
    We have several tables with small number fields and for some of them the issue reproduces but for others does not.
    And the issue doesn't appear:
    1. with Oracle client 11.1.0.6.20
    2. if I use data readers and compare values record by record.
    Our Oracle DB version is 10.2.0.4.
    Thanks,
    Maxim.

    For anyone that may find this at a later time, this behavior has now been corrected, and is available in 11107 Patch 31 and newer, available on My Oracle Support. Note that the "self tuning=false" did not work in all cases, so the only reliable solution is to get the patch.
    Greg

  • OracleDataAdapter.Fill() causes System.OverflowException on certain numbers

    This test shows how a value calculated in the database and stored in a column of type "number" (default scale/precision) causes an error upon retrieval using the OradleDataAdapter.Fill() method. The data type of the receiving column is irrelevant. The following example uses a decimal, but double, float, int, etc... all cause the same System.OverflowException error.
    Does anyone have a good suggestion of how to best handle this problem?
    I am using ODP.NET 9.2.0.4.0 (OraWin9204.exe) with Oracle9i (9.2.0.4.0) running both client and server on Windows 2000, using Visual Studio 2003.
    <code>
    /// <summary>
    /// The following test illustrates how a value that was calculated in the database
    /// causes an overflow error when retreiving it using the Oracle.DataAccess.Client
    /// </summary>
    public void ODP_CalculatedNumberIntoDecimalOverflowError()
         using (OracleConnection conn = new OracleConnection(CONNECT_STRING))
              conn.Open();
              try
                   using (IDbCommand createCmd = conn.CreateCommand())
                        createCmd.CommandText = "create table overflow_test (num number)";
                        createCmd.ExecuteNonQuery();
                   using (IDbCommand insertCmd = conn.CreateCommand())
                        insertCmd.CommandText = "insert into overflow_test (num) values (61 / 3)";
                        insertCmd.ExecuteNonQuery();
                   using (OracleCommand selectCmd = conn.CreateCommand())
                        selectCmd.CommandText = "select * from overflow_test";
                        DataTable overflowTest = new DataTable("overflow_test");
                        DataColumn num = new DataColumn("num", typeof (decimal));
                        overflowTest.Columns.Add(num);
                        OracleDataAdapter oda = new OracleDataAdapter(selectCmd);
                        oda.Fill(overflowTest);
                        int i = 0;
                        foreach (DataRow row in table.Rows)
                             Console.Out.Write("Row[{0}]:", i);
                             for (int j = 0; j < row.Table.Columns.Count; j++)
                                  Console.Out.Write(" {0}", row[j]);
                             Console.Out.WriteLine();
                             i++;
              finally
                   using (IDbCommand deleteCmd = conn.CreateCommand())
                        deleteCmd.CommandText = "drop table overflow_test";
                        deleteCmd.ExecuteNonQuery();
    </code>

    The problem is even worse: it also happens with aggregate functions like AVG
    CREATE Table Test (
    Value NUMBER(10,0)
    INSERT INTO Test VALUES (20);
    INSERT INTO Test VALUES (20);
    INSERT INTO Test VALUES (21)
    SELECT AVG(Value) from Test
    Adding the SafeMapping means we have to adjust our code to expect string values instead of decimals
    The other workaround: (use ROUND or TRUNC) means we have to adjust all Sql statements!
    Please solve this bug in the ODP.NET client, i.e. create a way to get normal .NET native type values into a DataSet. (oda.TruncateDecimals = true?)

  • OracleDataAdapter.Fill and arithmetic overflow exception

    Hi to all!
    In my ASP.NET 2.0 web-application I use ODP.NET to working with Oracle DB. When I execute a pipelined stored procedure an "Arithmetic pverflow exception" occures. Here is exception stack trace:
    в Oracle.DataAccess.Types.DecimalConv.GetDecimal(IntPtr numCtx)
    в Oracle.DataAccess.Client.OracleDataReader.GetDecimal(Int32 i)
    в Oracle.DataAccess.Client.OracleDataReader.GetValue(Int32 i)
    в Oracle.DataAccess.Client.OracleDataReader.GetValues(Object[] values)
    в System.Data.ProviderBase.DataReaderContainer.CommonLanguageSubsetDataReader.GetValues(Object[] values)
    в System.Data.ProviderBase.SchemaMapping.LoadDataRow()
    в System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
    в System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
    в System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
    в System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
    в System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
    в System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
    If I call this stored procedure from SqlNavigator it works properly. Hovewer I see that the data of one column of result cursor looks like 55,58554033940333204184424641611784101. If I round data of this column, the Fill method of OracleDataAdapter works without any exceptions. How can i solve this problem?
    Edited by: yoyoseek on Sep 3, 2008 2:09 AM

    Hi
    The reason you are seeing this, is because Oracle Number has a greater precision than .NET Decimal.
    There are a couple of ways out:
    * Convert manually to_char instead of number out.
    * Using OracleDataAdapter.SafeMapping, described here http://stanford.edu/dept/itss/docs/oracle/10g/win.101/b10117/features009.htm
    * Round down to the precision of .NET decimal before returning.
    Morten
    Edited by: gulhaugen on Sep 3, 2008 1:43 PM

  • Adapter.Fill 100x slower than Toad

    Loading 500 records into a typed dataset's table with adapter.Fill() takes 22 s. Each row contains standard datatypes and a single CLOB field (base64binary) that is about a page worth of characters. The CLOB is stored in a different tablespace from the rest of the row. This all seemed fine until I compared it with Toad loading the same 500 records onto the screen (0.2 s). Ok, there is the overhead of getting the schema, filling the typed dataset, etc., but I suspect that there is more to it than this. Perhaps the CLOB is being accessed in a suboptimal way (and this CLOB access is the heart of the application). Oracle 10g with ODP.Net 10 latest version, but performance was identical on Oracle 8i and ODP.Net whatever. I know that I can optimize in Oracle 10 with rowSize and fetchSize, but they defeat the purpose of adapter.Fill simplicity.
    Anyone have suggestions what to try in order to probe the problem more deeply? Solutions?

    I'm running into a similar problem. Did you ever find a solution?

  • New Safari User-former PC user-Slow Page Fills

    safari page fills seem slow even with cable modem hard connected. Any way to "tweak" performance or check for problems? My apologies but as a former PC user, there was usually tweaking to do....

    1. Yes it is helpful, but I would limit the choice to the latest version supported by Apple, because it's being tested with their apps. You can download them running "Software Update" from the Apple menu. If it doesn't propose any Java update, you are already running the latest one
    2. I am not aware of any. Other people may. I know of some applications that supposedly make downloads faster, but they often cause problems with Safari.
    Did you try my previous suggestion to run Firefox or Opera or Camino, just to have a comparison?

  • Data provider internal error(-3000)  during DataAdapter.Fill

    I get this error sporadically.
    From other messages on this forum, it seems others are having similar problems. It appears the Oracle staff
    is still struggling to identify and fix (or did I miss a post?)
    I hope the next release can include some more informative diagnostic error messages. (no judgment implied, just a suggestion).
    But I need this to work, so I'm posting my
    info as well in hopes it will help.
    Sorry for the length, but I think all the detail may be needed to diagnose.
    I have been using ODP.Net for weeks without trouble
    until recently. I just added a CLOB field to my table yesterday, and
    the problem started. I don't know whether that's cause or coincidence.
    Possible workarounds I will try:
    1) Explicit select of columns rather than select *
    2) Retry once on failure after short delay
    Below, I'm including the exception message from the ASP.Net page.
    It occurs at the same spot in my code, but often
    it works fine. Now, an hour later, I cannot repeat the problem.
    I've edited the "Source Error" section to
    provide more of the code, so you can see the full context.
    I've also pasted the stored procedure called so you can see what that is about.
    I need this to work, so feel free to contact me if you need further information
    to diagnose this in order to fix it.
    I go live on March 7, so if I don't get a fix soon and can't find
    a workaround, I'll just make a lame error message like "Site is very busy, please try again".
    Even though the site is NOT busy. But having them try again seems to work.
    And I don't want to tell them why I'm asking them to try again <grin>.
    I am thinking of putting a try/catch block and sleeping for a second and then trying one more
    time in my code. I'll let you know if that is an effective work-around.
    David Kreth Allen
    University of Minnesota
    Carlson School of Management
    [email protected] remove XYZ to send emails
    612-625-0386
    <WebPageError>
    Server Error in '/ScholarshipApplicationWeb' Application.
    Data provider internal error(-3000)
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: Oracle.DataAccess.Client.OracleException: Data provider internal error(-3000)
    Source Error:
         OracleCommand cmd = new OracleCommand();
         cmd.Connection = new OracleConnection(
              ApplicationEnvironment.current.database.OracleConnectionString);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "pkg_batch.get_details";
         cmd.Parameters.Add("batch_id",OracleDbType.Int32,
              batchId,ParameterDirection.Input);
         cmd.Parameters.Add("batchCursor",OracleDbType.RefCursor,
              DBNull.Value,ParameterDirection.Output);
         cmd.Parameters.Add("majorsCursor",OracleDbType.RefCursor,
              DBNull.Value,ParameterDirection.Output);
         cmd.Parameters.Add("detailCursor",OracleDbType.RefCursor,
              DBNull.Value,ParameterDirection.Output);
         OracleDataAdapter da = new OracleDataAdapter(cmd);
         DataSet ds = new DataSet("batches");
         da.Fill(ds);
         DataTable dt = ds.Tables[0];
         dt.TableName = "batch";
    Source File: C:\Projects\ScholarshipSolution\ScholarshipLibrary\Data\ScholarshipApplicationBatch.cs Line: 329
    Stack Trace:
    [OracleException: Data provider internal error(-3000)]
    Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, IntPtr opsSqlCtx, Object src, String procedure, String[] args)
    Oracle.DataAccess.Client.OracleDataReader.NextResult() +1259
    System.Data.Common.DbDataAdapter.FillNextResult(IDataReader dataReader) +98
    System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +261
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +129
    Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +516
    Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +290
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
    CSOM.ScholarshipLibrary.Data.ScholarshipApplicationBatch.getDataById(Int32 batchId) in C:\Projects\ScholarshipSolution\ScholarshipLibrary\Data\ScholarshipApplicationBatch.cs:329
    CSOM.ScholarshipLibrary.Data.ScholarshipApplicationBatch.GetById(Int32 batchId) in C:\Projects\ScholarshipSolution\ScholarshipLibrary\Data\ScholarshipApplicationBatch.cs:290
    CSOM.ScholarshipApplicationWeb.BatchSummaryControl.Edit_Click(Object sender, CommandEventArgs e) in c:\inetpub\wwwroot\ScholarshipApplicationWeb\BatchSummaryControl.cs:68
    System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +110
    System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +115
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
    System.Web.UI.Page.ProcessRequestMain() +1244
    Version Information: Microsoft .NET Framework Version:1.0.3705.288; ASP.NET Version:1.0.3705.288
    </WebPageError>
    <PackageBody>
    PROCEDURE GET_DETAILS(
    p_batch_id IN number,
    batchCursor OUT pkg_batch.refcur,
    majorsCursor OUT pkg_batch.refcur,
    applicationsCursor OUT pkg_batch.refcur
    IS
    BEGIN
    OPEN batchCursor FOR SELECT
    * FROM scholarshipApplicationBatch
    where scholarshipApplicationBatch_id = p_batch_id;
    OPEN majorsCursor FOR SELECT
    * FROM major_response
    where batch_id = p_batch_id;
    OPEN applicationsCursor FOR SELECT
    * FROM schol_detail
    where batch_id = p_batch_id;
    END GET_DETAILS;
    </PackageBody>

    One workaround that seems to work is to retry in a loop.
    Sample code is pasted below.
    Obviously it may still fail, but less often.
    I'll report any further changes that affect
    the behavior in hopes it will assist the Oracle staff in
    fixing it.
    <CODE>
    try
    da.Fill(ds);
    catch (OracleException excp)
         const int maxTrys = 5;
         int failureCount = 1;
         bool succeeded = false;
         for (int i = 0;i<maxTrys;i++)
              try
                   System.Threading.Thread.Sleep(
                        TimeSpan.FromSeconds(1));
                   ds.Clear();
                   da.Fill(ds);
                   i = maxTrys;
                   succeeded = true;
              }//try
              catch
                   failureCount ++;
         }//for
         errorHandler.Report(
              String.Format(
              "Failure in da.Fill in ScholAppBatch. " +
              " Failed {0} times. Finally Succeeded = {1}.",
                                            failureCount.ToString(),
         succeeded.ToString()),
              excp);
    }//catch
    </CODE>

  • OracleDataAdapter ORA-01722: Invalid Number

    I am Using .NET petshop Architecture and in this architecture oraHelper class have following code.
    public static DataTable ExecuteReader(string cmdText)
                   //Create the command and connection
                   OracleCommand cmd = new OracleCommand();
                   OracleConnection conn = new OracleConnection(CONN_STRING_NON_DTC);
                   try
                        PrepareCommand (cmd, conn, null, CommandType.Text ,cmdText ,null);
                   OracleDataAdapter sda = new OracleDataAdapter(cmd) ;
                        DataTable dt = new DataTable() ;
                        sda.Fill (dt);
                        conn.Close ();
                        return dt;
                   catch(Exception e )
                        conn.Close();
                        throw e ;
    I am getting error on FILL method as under
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: Oracle.DataAccess.Client.OracleException: ORA-01722: invalid number.
    Could anyone tell me whats goign wrong.
    Regards
    Uzma

    Complete Exception trace is as under
    Oracle.DataAccess.Client.OracleException ORA-01722: invalid number at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure) at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) at Oracle.DataAccess.Client.OracleDataReader.Read() at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping) at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDataReader dataReader) at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataTable dataTable, IDataReader dataReader) at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at odptest.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\odptest\webform1.aspx.cs:line 66

  • Why does my live video feed slow?

    While watching live video on my macbook, it continually gets slower and jumpy.  I can quit and restart safari, and it works for a while, then gets slower again...What can i do?  I have this issue with firefox and google chrome as well...

    Welcome to Apple Support Communities.
    First, judging by the OS X version listed in your profile, you probably have a 2006 - 2007 or maybe early 2008  MacBook.
    The early MacBooks have the GMA950 or GMA3100 video chipset, and are limited to 64MB shared video RAM.
    You're stuck with this. There are no upgrades.
    Second, you might still have just 512MB or 1GB of system RAM memory installed in your computer.
    OS X runs better with more memory. Expanding your RAM to 2GB or 4GB can increase overall system performance, because when a system gets short of free RAM memory, it buffers memory out to the hard disk, drastically slowing performance.
    You can monitor how much free RAM is available with Activity Monitor. When the system gets very short of free RAM, performance lags. A high number of Page outs and Swap used will indicate the need for more RAM.
    If you put the System RAM icon in your system dock, you can watch the green 'slice' of the memory pie chart get smaller and smaller as your video slows.  Closing all other apps will make the maximum amount available.
    As you've discovered, quitting and restarting the browser will free some RAM memory temporarily, but eventually it fills and slows once again.
    Third, you might be running out of free hard disk space. If you have less than 10GB of free hard disk space free, that lack of disk space also reduces system performance. Installing a larger and faster (7200RPM vs 5400RPM) hard disk can increase overall system performance a bit.
    Fourth, Adobe Flash content, and especially Flash video is a huge resource hog. On older MacBooks, you'll often hear the fan run at full speed because the CPU is working hard and generating lots of heat. Some browsers seem a bit better than others on certain sites and certain pages, but no browser will 'cure' the problem. I use the 'Click to Flash' extension for Safari, and set the preference for HTML5 video, instead of Flash, whenever possible.
    Fifth, a faster internet connection will help a little. When I went from a 512Kbit connection to a 3.0Mbit, video performance improved a bit. Moving recently to a 15Mbit connection also helped a bit more. But still no miracle cure. Using a wired Ethernet connection might give a bit better performance than WiFi, if you're not getting a good WiFi signal or there is lots of local interference.
    Sixth, allow the video content to buffer completely by pausing playback until it is fully loaded before beginning to watch it. Watch at as low a resolution as possible. Watch it in partial screen, not full-screen.
    If you want to spend money (a few hundred dollars), you can do all of the following:
    Add system RAM up to the maximum supported by your computer
    Purchase a larger, faster hard disk
    Then upgrade OS X to Snow Leopard OS X 10.6.8.  You now have to call Apple at 1-800-MY-APPLE to purchase it, there is no more online order available.
    And you'll still have a five-year-old computer with quite mediocre video performance.
    The best solution in my opinion, for optimum video performance, is to save your money and invest in a newer MacBook (late 2008 aluminum or 2009-10 unibody), a MacBook Air, or MacBook Pro or recent refurb available from Apple Store online.
    There has been huge progress in video chipset technology over the years, and processors keep getting smaller and faster and more energy-efficient, and now most every Mac comes with at least 4GB RAM installed. Many have SSD drives available standard or as an option. But planned obsolescence is part of the whole picture. In a few years, you'll need to buy a new machine again.
    Message was edited by: kostby

  • Table schema not being updated after a SQL 'alter'

    Hi all,
    I have a problem to do with altering table columns and queries relating to that table thereafter.
    I have a table which has been queried using an OracleDataAdapter.Fill(DataSet), if I add a column using say using an OracleCommand.ExecuteNonQuery() or sqlplus session (and doing a 'commit' after) the column does not show up on subsequant 'Fill' queries unless I reopen the DB connection.
    Just as an example, here is my test table which is defined as:
    create table steveTest
         id numeric,
         name varchar(15),
         address varchar(25)
    with a few rows of data in...
    If I query the table using ODP.NET (10 & 11)
    OracleDataAdapter oraDap = new OracleDataAdapter("select * from steveTest",oraCon);
    oraDap.Fill(ds);
    Everything is fine until I add/remove a column with say sqlplus or via an OracleCommand.ExecuteNonQuery()
    e.g     "alter table steveTest add address2 varchar2(30)"
    Subsequent Fill or data reader queries only show the unchanged table schema, without the newly added column. If I remove a column the symptoms are worse and I receive a "ORA-01007: variable not in select list"
    I can only think that ODP.NET is caching the schema for that table on that particular connection. Is there anyway to forcefully clear this out?
    I have tried OracleConnection.PurgeStatementCache(); but this doesn't seem to help me.
    My connection string is defined as:
    Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.27)(PORT=1521)))
    (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xe)));
    User Id=system;
    Password=mypass;
    HA Events=true;
    Validate Connection=true;
    Pooling=false;
    Enlist=false;
    Statement Cache Purge=true;
    Statement Cache Size=0;
    The application I am writing is a middle tier application which handles various DB drivers and maintains several 'connection queues' which multiple lightweight client applications can use concurrently. As you can imagine, a possible scenario may arise where a table is queried, altered and then queried again which causes the above issue. The only way I can stop this from happening is if I close/open the DB connection but I don't want to do this after every alter statement.
    I have tried this on Oracle Express 10g and Oracle 10g servers with ODP.NET clients (10.2.0.100/2.111.6.0). Just a point I thought worth mentioning, this does not happen in sqlplus.
    Any help would be much appreciated.
    Regards,
    Steve

    maybe u can check by debuggin the incoming idoc in we19.
    1. check the data u are sending from the source system
    2. check for the field before and ater change in the target system.
    maybe the field is update with the same content. also check the status record of the idoc
    Message was edited by:
            Prabhu  S

  • How do I limit the number of rows retrieved at a time using RefCursor?

    I have a PL/SQL package in use, that returns a REF CURSOR. This is currently being used in a Forms 6i application. Now I want to develop an ASP.NET web application that displays exactly the same information as my Forms 6i module. In fact those two applications will be used concurrently for a while.
    I looked at the sample code provided on otn.oracle.com and decided to use the OracleDataAdapter.Fill()-method to fill a dataset and bind that dataset to a pageable GridView. Now I wonder, whether this method retrieves ALL records of the query at once and how I can limit the number of rows fetched? The Select statement retrieves up to 10000 rows at a time. Most of the time, a user is only interested in the first 20-30 rows. Forms 6i fetches more rows as the user scrolls down, how can I implement the same behavior in ODP.NET?
    - Markus

    Excuse me, but the reply does not quite answer my question. Maybe I did not explain my concerns clear enough:
    I understand the use of the two properties (RowSize and FetchSize) to reduce the amount of round trips needed to transfer the data - not the number of rows fetched in total. This would still lead to a situation where all rows are transferred, when I am using the OracleDataAdapter.Fill()-Method. Is this correct or did I misunderstand the function of this method?
    I quote the otherwise really helpful article you send me:
    Of course, there is a cost if the fetch size is arbitrarily large. More client-side memory and processor cycles will be needed to store and manage a larger amount of data. The goal is to find a high-performing balance between the number of round trips and the amount of data retrieved per trip.
    My RowSize is for sure a bit larger than the one in the given example. The query will probably be used by up to 100 users at a time, so I would like to limit the resource-costs not only on the network by the number of round trips, but also on the web-server which is storing all these records in it's memory per user-request.

  • Comments and questions from a new Entourage switcher

    When Leopard came out, I decided to take the plunge and move from 7 years of Entourage-ing over to the whole Mail/Address Book/iCal/.mac combo.
    It's been a challenge, and one I'm glad I'm making. I really see the future lies here, especially with all the great GTD tools (like OmniFocus) that are so well integrated into these Mac apps.
    I have a bunch of things that I'd like to ask or comment on, that I've collected since the switch. I hope these don't sound like whining. More, it's really to stimulate conversation in these areas to find out if anyone has found workarounds, add-on utilities, or even if I'm not doing something right.
    *1. Checking If They're Already In Address Book.* If I get an email from someone, I like to know if they're already in my Address Book. In Entourage, you'd right-click, select "Add to Address Book" and if they were already in there, a window would pop up, saying, "This already exists, would you like to add to it, or just open the contact". In Mail, there's no such checking, so clicking on "Add to Address Book" can end up duplicating and triplicating what's already there. In other words, I'm looking for a quick way to open up that person's contact info.
    Oddly enough, sometimes a right-click on someone's email address, who is already in ones Address Book, will bring up an "Open in Address Book." However, it's extremely inconsistent. My own brother's emails don't work like that. But odd companies, whom I rarely get email from, will show it.
    *3. No Categories.* This is the biggest missing piece for me. If I get an email from someone that treats me with familiarity, but I don't recognize them, there's no way to go into my address book and tell what relationship I have with that contact. Client? Acquaintance? Purchaser? Relative I only met once? This is because there seems to be no way to attach a Category to each contact. Once you have over 2000 contacts, it becomes difficult to remember what each person or company is there for (we have over 5200). Which product did they purchase? Or are they a vendor. Someone I met at a party? Ex girlfriend? There is the Mail Group function, but those act more like Smart folders and aren't attached to the actual contact, so when viewing the All Contacts, there's no way of telling who's who. Even if there were simply a way to color each contact, those colors could act as a category, and one could sort by them. This is my major concern right now with Mail over Entourage. Here's hoping someone creates a utility that does just this!
    *4. No Easy Way to Copy Entire Address.* Every hour, we are copying addresses and pasting them into a customized DYMO label (that has our return address and company logo on it). There doesn't seem to be any way to grab the entire mailing address in one Copy. You can highlight/copy the address, street and zip, and paste that into, for instance, a Dymo label, but you have to go back and grab the name separately. The Print function has some very interesting ways to print (including to a plain default Dymo label), but since we have customized labels, we just need to copy the address ourselves.
    *5. Search Function Blandness*. The search function could use more refinement. If you search for "Comcast," you logically get all of the contacts that have "comcast.com" in their email address (Further, if the word happens to be in the Notes field, it'll bring those up as well). But there should be a way where it gives precedent to the actual Comcast company contact—which the word "Comcast" in the company field—instead of being forced to scroll through hundreds of contacts to find the actual one I'm looking for.
    *6. Auto Name Fill To Slow.* When entering names in an email name field, you can't go very fast, because Mail takes a couple of seconds or so to recognize the name you're typing. For instance, if I'm sending an email to Mark, and type Mar, Mail autofills the rest for "Mark Smith" but the spinning thingie is still spinning, and if I don't wait that extra second, and hit tab or Return, Mail just puts in an empty "Mar" without any email address. I have to wait until the spinning thingie stops before hitting tab or return. When entering 5 or 10 email addresses, this is a hassle. Often I find that even after the spinning thingie stops, and Mail looks like it has autofilled, if I click Tab or Return, the address often still didn't fill correctly. It only stopped at the 3 or 4 letters that I'd typed in. If I didn't catch the error, I think I've sent it, only to get an error message later on.
    *7. iCal Alarm Window.* They forgot the lower right corner resize thing in the iCal Reminder window! And regardless of the number of alarms (I often have 20 or more), the green button is always grayed out. So if you have 20 or 30 iCal reminders, you can only view them one at a time in that small window, and have to use the up and down arrows. I'd like to be able to drag this window down so I can view all 20 at a time.
    *8. Limited iChat Alarm Window Delay options.* If you want to delay (called "repeat" in iCal lingo) any to-do in the iCal Alarm window, you have options for 1 minute, 5, 15, and 30 minutes, 1 and 2 hours, 1 day and 1 week. It'd be great to if a hack were developed that allowed for other useful delays, such as "tomorrow morning" (so one can see everything all at once first thing in the morning), 2 days, 3 days, and 2 weeks. A "4 hours" would be handy as well, since that's like saying "bug me this afternoon."
    Again, don't misinterpret this as whining, I'm digging the move and am totally committed to it. I just want to see if anyone has wondered about any of these, too, and has discovered a workaround (or a pref I'm not seeing!) or knows of a 3rd-party utility (or downright hack).
    Thanks for any ideas on these.
    Edit: corrected some misspellings...

    Re: Categories - I too miss that and I've 'solved' it two different ways. First, I set up groups which helps me find someone who I know within a certain context. ie, I know I'm looking for John who is a student. I look in the student group for all the Johns. Second, I use the note entry to jot down things I want to remember about the person.

  • Moving RAW files from one drive to another without loosing all your work in Lightroom

    I am posting this for two reasons, the first is I have been trying to figure out how to get my raw files off my hard drive & onto my external hardrive for ages, as my laptop is filling up & slowing down with the huge files my new camera captures. I have been researching this & have found it hard to find a clear answer to my particular problem using Windows 7 not a Mac.
    After loosing some files in Lightroom when I moved them within Explorer instead of Lightroom, & being unable to figure out how to add a new drive in the Library module in Lightroom to move them to, I wanted to make sure I got it right when I moved the lot of them. I finally figured out a way, it might be round about, but it got it done without any trouble.
    This is how I moved my files:
    In Windows Explorer I moved one folder which Lightroom uses, from my laptop to the drive I want to store them all on from now on.
    Then in Lightroom, under 'Library' (along the top, eg 'File' 'Edit' 'Library' etc) I selected 'Find missing photos' & led Lightroom to the new location. Now my external hd as well as my laptop hd was listed under 'Folders'  (on the Left hand side of the screen along with 'Navigator' 'Catalog' 'Folders' etc) in the Library module.
    After that it was simple. Just a matter of dragging & dropping from my C drive (laptop)to my G drive (external hd) while in Lightroom; Library module. This way Lightroom keeps track of where the files are stored & nothing is lost.
    From now on I will be importing raw files from my camera to my external hd & working on them all from there.
    If anyone has a simpler way please share it. I am very new at this & don't profess to be an expert. So any advice would be greatly appreciated
    The second reason for this post is that I'd like to know how to make sure that the adjustments made in Lightroom are stored on the external hd as well, incase anything happens to the laptop?
    Is exporting the catalogue what I need to do?
    Or can I back up the Lightroom adjustments to my external hd somehow?
    OR when I moved the raw files did this information move with them?
    I understand that my raw files are the original unaltered files & that the changes made in Lightroom are recorded seperately & applied in Lightroom itself..... Well, that's what I think I know about how it all works after a few months of using it, so please forgive me if I'm missing something & I'll be very happy to be enlightened if you'd be so kind
    Happy New Year to you all!

    All the adjustments are stored in the catalog (not in the file). So you want to back it up, and the external is a good place. In the catalog settings (Edit > Catalog Settings > General) there is an option to set a regular backup schedule, and you'll be asked where you want to put it.
    The backup is just a regular copy of the catalog, and you can simply launch Lightroom from that, by double-clicking it.
    The image files themselves should also be backed up of course, but that's outside Lightroom.

Maybe you are looking for