----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: hclBuddy Message 4 in Discussion First Step is to Create the Catalog To create a catalog <o:p></o:p> In the MMC, select Index Server. <o:p></o:p> From the Action menu, select Stop. <o:p></o:p> You must stop the Content Index service before you can add a catalog. <o:p></o:p> From the Action menu, select Create New and then Catalog. <o:p></o:p> In the Add Catalog dialog box, type the name of the catalog. <o:p></o:p> Click the Browse button and select a directory where you want this new catalog to be located. <o:p></o:p> When you have selected the catalog location, click the OK button. <o:p></o:p> With Index Server selected, from the Action menu, select Start. <o:p></o:p> Restarting Index Server makes the new catalog available for the indexing process. <o:p></o:p> Second Step is to access it from Code <o:p></o:p> //Create Connection System.Data.OleDb.OleDbConnection ConSearch = new System.Data.OleDb.OleDbConnection(); <o:p></o:p> <o:p></o:p> //Create Command<o:p></o:p> System.Data.OleDb.OleDbCommand cmdSearch = new System.Data.OleDb.OleDbCommand();<o:p></o:p> <o:p></o:p> //Set the C.S<o:p></o:p> ConSearch.ConnectionString = "Provider=\"MSIDXS\";Data Source=\"[Catalog name]\";";<o:p></o:p> <o:p></o:p> //Set the Connection to Command<o:p></o:p> cmdSearch.Connection = ConSearch;<o:p></o:p> <o:p></o:p> cmdSearch.CommandText = "select <field> from scope() where FREETEXT(Contents, '"+<text to be searched> +"') and filename <> 'search.aspx' <o:p></o:p> <o:p></o:p> ConSearch.Open();<o:p></o:p> <o:p></o:p> OleDbDataReader rdrSearch = cmdSearch.ExecuteReader Hope this is useful ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
