WMI query like returning different results than =


i have following 2 wmi querys biztalk 2006 r1. difference like replaced =

        public void messages(string instanceid) 
        {  
            dataset messages = null
            querywmi querywmi = new querywmi(); 
 
            // get the messages related to a particular service instance 
            messages = querywmi.query("select * from msbts_messageinstance where serviceinstanceid like '" + instanceid + "'"); 
 
            dataset messagestest = querywmi.query( "select * from msbts_messageinstance where serviceinstanceid = '" + instanceid + "'" ); 
 
            try 
            { 
                if( messagestest.tables[0].rows.count != messages.tables[0].rows.count) 
                { 
                    messagebox.show( "different count" ); 
                } 
            } 
            catch( exception exc) 
            { 
                messagebox.show( common.parseexception(exc) ); 
            } 
        } 
 


the instance id is

instanceid = "{b0099eac-87f7-4e54-b538-5f7a73d72d48}";

even though same code run against following 2 querys , should return same values first 1 (the like) returns more records.
the instanceids same , should returned second query.

in example i've given 4 records returned query , 2 = query.

looking @ returned value's serviceinstanceid values {b0099eac-87f7-4e54-b538-5f7a73d72d48}.

i want able use = since runs faster.

anyone able shed light this?


ps.
here code run

managementobjectsearcher managementsearcher = new managementobjectsearcher("root\\microsoftbiztalkserver", query); 
managementobjectcollection managementobjectcollection = managementsearcher.get();

os running on? "like" supported in wmi on xp , server 2003 according to http://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx. wonder if wmi engine might including more results query because has reinterpret query , gets duplicates?

i try adding distinct keyword query clause make "select distinct serviceinstanceid ..." query see if same results = one.

thanks,

if answers question, please use "answer" button | ben cline


BizTalk Server  >  BizTalk Server General



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to send non-standard Content-Type header ?