Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Command Time Out Issue in case of Batch Query

User_P5SEXSep 2 2021

Hi,
I am use Ref Cursors to read multiple data in batch query. Its work fine but problem is Command Time out not works in case of batch reading. Without Cursor, Command Time out works. My Sample Code is
// Oracle.ManagedDataAccess.Client
cmd = new OracleCommand(@"begin
open : 1 for select * from Table1;
open : 2 for select * from Table2;

    end;", con);  

    cmd.Parameters.Add(new OracleParameter("1", OracleDbType.RefCursor, ParameterDirection.InputOutput));  
    cmd.Parameters.Add(new OracleParameter("2", OracleDbType.RefCursor, ParameterDirection.InputOutput));  
    cmd.CommandType = System.Data.CommandType.Text;  
    cmd.CommandTimeout = 5;  

    //var a = cmd.ExecuteNonQuery();  
    reader=cmd.ExecuteReader();  
    while (reader.Read())  
    {  
      Console.WriteLine(reader.GetInt32(0)); //Just example  
    }  

    reader.NextResult();  
    while (reader.Read())  
    {  
      Console.WriteLine(reader.GetInt32(0)); //Just example  
    }

Comments

Can you please have a look at the VS Code Windowing options to see if any of them do what you want?
In the VS Code menu, select View->Editor Layout

User_ZZQ0F

Everytime I run query I use shortcut Ctrl+Alt+Right to split pane.
Would be nice to do make it automatically.

1 - 2

Post Details

Added on Sep 2 2021
2 comments
127 views