log.Name = "ftcPubsTest" '将新目录加入到目录集合中 objSQL.Databases("pubs").FullTextCatalogs.Add objCatalog step4. 在表上创建全文本索引。 Dim objTable As New SQLDMO.Table '指定被索引的表 Set objTable = objSQL.Databases("pubs").Tables("authors") '指定目录名和唯一索引名 objTable.FullTextCatalogName = "ftcPubsTest" objTable.UniqueIndexForFullText = "UPKCL_auidind" objTable.FullTextIndex = True
'指定被索引的列 objTable.Columns("au_lname").FullTextIndex = True objTable.Columns("au_fname").FullTextIndex = True
'激活该表上的全文本索引 objTable.FullTextIndexActive = True
step5. 启动全文本目录 objCatalog.Start SQLDMOFullText_Full 使用存储过程 step1. 使 pubs 为全文本检索的数据库 USE Pubs go sp_fulltext_database 'enable'
step2. 创建新的目录 sp_fulltext_catalog 'ftcPubsTest','create' step3. 指定被索引的表 sp_fulltext_table 'authors','create','ftcPubsTest','UPKCL_auidind' step4. 指定被索引的列 sp_fulltext_column 'authors','au_lname','add' sp_fulltext_column 'authors','au_fname','add' step5. 激活该表上的全文本索引 sp_fulltext_table 'authors','activate' step6. 启动全文本目录 sp_fulltext_catalog 'ftcPubsTest','start_full'
http://www.csdn.net/develop/read_article.asp?id=8894
http://www.csdn.net/develop/read_article.asp?id=8894
上一页 [1] [2]
|