Problem with DequeueArray

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ppvdude
Posts: 3
Joined: Mon 23 Mar 2009 21:46
Location: Pennsylvania

Problem with DequeueArray

Post by ppvdude » Mon 01 Jun 2009 22:58

I am getting the following error when using DequeueArray with a size greater than the available messages in the queue:

Month is out of range.
Parameter name: month


A size of one works fine and if there are more messages than the size, it works. But when there are fewer messages than the size I get the above error, no messages are returned, but the messages are dequeued (MSG_STATE set to PROCESSED) from the queue.

I am using dotConnect 5.20.29 against Oracle 10g.

Below is the section of code where I set up my Connection and DequeueOptions:

Code: Select all

using (OracleConnection _InQConn = new OracleConnection(InQConn))
{
_InQConn.Open();
   using (OracleQueue _InQ = new OracleQueue(InQueue, _InQConn))
   {
      _InQ.DequeueOptions.Navigation = OracleQueueNavigation.FirstMessage;
      _InQ.DequeueOptions.DeliveryMode = OracleQueueDeliveryMode.Persistent;
      _InQ.DequeueOptions.Visibility = OracleQueueVisibility.Immediate;
      _InQ.DequeueOptions.DequeueMode = this.DequeueMode;
      _InQ.DequeueOptions.ConsumerName = this.InQConsumer;
      _InQ.DequeueOptions.WaitTimeout = 0;
      OracleQueueMessage[] qMsgs;
      try
      {
         qMsgs = _InQ.DequeueArray(this.BatchSize);
      }
      catch (OracleException e)
      {
         if (e.Code == 25228)
         {
            //No Messages
            return 0; 
         }
         throw(e);
      }
      catch (Exception e)
      {
         throw (e);
      }
      ...
      ..
      .
It should be noted that I also get an error (ORA-25228) when there are no messages to dequeue but that is being trapped and handled.

Thanks for any help.

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 02 Jun 2009 15:11

Did you try to dequeue more messages than there was its amount in the queue? You didn't specify the connection mode you are using. How did you enqueue your messages? What DequeueMode do you use?

Please send us (support at devart*com) a whole test project that reproduces the problem.

ppvdude
Posts: 3
Joined: Mon 23 Mar 2009 21:46
Location: Pennsylvania

Post by ppvdude » Mon 08 Jun 2009 15:54

I have sent the requested information to both support@devart.com and AlexSh@devart.com on 6/3 and 6/4, respectively, but as of yet have not received a reply. Please let me know if there a different email address I should be using. I have sent it to both again.

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 09 Jun 2009 09:29

We have answered you by e-mail on the 5th of June (the letter contains our test project). I am sending you it again now. If you don't receive it, please provide me (alexsh*devart*com) with another e-mail address that would not reject attachments.

Post Reply