01-26-05 10:54 PM
There is a problem with the MessageArchive object not returning any messages
,
and the problem is an error in one of the stored procs that is installed
with the hotfix. I thought I had saved the information to my blog, but I
went and looked and the actual code is not there. I have also switched
companies since I started this thread so I cannot find the changes I made.
The only thing I wrote about the issue was: The Tracking_Spool information
in the SQL stored proc is not referencing the correct table.
Its too bad that I did not save any more information.
"magenic_andym" wrote:
> I am attempting to use the MessageArchive class to enumerate over all
> messages in the MessageBox db (within a large date span) but I never
> get any messages from the MessageArchive.Messages property. I don't
> get any errors, there just aren't any messages in the enumeration.
> There are suspended resumable and suspended not resumable service
> instances in HAT.
>
> Here is the code I'm using:
>
> ------------------------------------
>
> MessageArchive archive = new MessageArchive();
>
> archive.BatchSize = 0;
> archive.CommandTimeout = 0; //Infinite
> archive.MaxMatches = 0;
> archive.From = new DateTime(2004, 1, 1);
> archive.Until = new DateTime(2005, 12, 31);
>
> archive.ConnectionString = "Persist Security Info=False;Integrated
> Security=SSPI;database=BizTalkMsgBoxDb;s
erver=localhost";
>
> try
> {
> foreach(Object oMsg in archive.Messages)
> {
> IBaseMessage msg = (IBaseMessage)oMsg;
> IBaseMessageContext cntxt = msg.Context;
> }
> }
> catch(Exception e)
> {
> Console.WriteLine(e);
> }
> finally
> {
> archive.Dispose();
> }
>
> ----------------------------
>
> -Am I attempting to use this class in a manner that it is not intended?
> -Should this code find messages related to suspended service instances?
> -Is there anything wrong with the code?
>
> TIA,
>
> Andy
>
>
[ Post a follow-up to this message ]
|