Guest V. Arun Kumar Patro Posted August 20, 2007 Posted August 20, 2007 When I copy a file (e.g. 21025891.txt) to scope path of the Catalog and run the following code immediately after that, index server did not provide me any result. However, after few minutes the same code returned me the desired results. Dim odbSearch As New System.Data.OleDb.OleDbConnection, _ cmdSearch As New System.Data.OleDb.OleDbCommand, _ rdrSearch As System.Data.OleDb.OleDbDataReader odbSearch.ConnectionString = "Provider=""MSIDXS"";Data Source=""CSCatalog"";" cmdSearch.Connection = odbSearch cmdSearch.CommandText = "select fileName,directory from scope() where filename='21025891.txt' and Contains('(""Note"") & (""financial"") & (""statement""|""information"")')" odbSearch.Open() rdrSearch = cmdSearch.ExecuteReader() If rdrSearch.HasRows = True Then While rdrSearch.Read() Console.WriteLine(rdrSearch(0).ToString()) End While rdrSearch.Close() end if odbSearch.Close() How can I be able to programmetically know the time I need to wait to run the above code for correct results? Thanks V. Arun Kumar Patro Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.