Last post Feb 29, 2016 06:20 PM by Lannie
Feb 26, 2016 10:02 AM|ketanerp|LINK
I have implemented window search functionality in asp.net using c#
below is code for it.
odbSearch = new System.Data.OleDb.OleDbConnection("Provider=Search.CollatorDSO.1;Extended Properties=\"Application=Windows\"");
System.Data.OleDb.OleDbCommand cmdSearch = new System.Data.OleDb.OleDbCommand();
cmdSearch.Connection = odbSearch;
cmdSearch.CommandText = "SELECT Filename,DocAuthor,Size FROM SCOPE() WHERE (CONTAINS ('\"" + searchCriteria + "\"') or FileName like '%" + Core.Utilities.GetSearchFileName(searchCriteria) + "%')";
OleDbDataReader rdrSearch = null;
rdrSearch = cmdSearch.ExecuteReader();
This code working fine in all instance.
But on client machine below error is display as soon as we write text and hit search button.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Unspecified error: -2147219688(0x80040718)
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
There is no description what about this error.
I think some driver is missing but on another machine I do not install any driver.
I have enable window search service from control panel.
Can anyone have an idea why it is not working on one machine. I have also tried by give everyone write to temp folder.
Lets Discuss Problem
Feb 26, 2016 09:01 PM|Lannie|LINK
What if the client machine does not have all the .NET libraries and service packs installed?
Feb 29, 2016 05:40 AM|ketanerp|LINK
Thanks for reply.
It is installed and working perfectly.
Because other functionality is working. Only document search is not working.
Feb 29, 2016 06:20 PM|Lannie|LINK
I would try next
Replace the searchCriteria variable
with hard coded test data and see if it runs.
If it does, then some punctuation issue with feeding in searchCriteria variable