Jump to content

Featured Replies

Posted

Hello all.

 

 

I hope you can help me. I'm trying to use the Windows Search but my code throws an exception whether I use wilcards ( &, *, _, ...) or empty text.

 

 

My code is:

 

 

 

string sentence = "Select System.ItemName, System.ItemPathDisplay, System.ItemUrl from SystemIndex where " +

"CONTAINS('" + this.SearchString.Text + "') AND SCOPE = 'file:myscope'";

 

 

Then I execute the code but I get the next exception if SearchString.Text is empty or a wilcard.

 

 

 

IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

 

 

The directory where I am searching is indexed and I select 'files and content'. If SearchString.Text contains a word, it works properly but it doesn't work in the other cases.

 

 

Could someone help me, please?

 

 

Thanks so much!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...