当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: http://neijiang.net/aierxp/old http://neijiang.net/aierxp http://expert.csdn.net/expert/topic/1662/1662799.xml?temp=.5193598 ......
 ·需要理由吗    »显示摘要«
    摘要: 想要分的来吧! ......


哪位大虾用过sqlDMO.SQLServer这个引用呢

哪里有帮助文档

NO.1   作者: iwillgo2

sql   server中有帮助

NO.2   作者: lihonggen0

SQL-DMO   Examples:   Full-text   Indexing  
  These   examples   illustrate   Microsoft   Search   full-text   index   configuration   and   catalog   population.  
   
  Examples  
  A.   Creating   a   Microsoft   Search   Full-Text   Catalog  
  The   example   illustrates   enabling   a   Microsoft®   SQL   Server™   database   for   participation   in   Microsoft   Search-supported   full-text   indexing   and   query.   Enabling   a   database   is   a   two-step   process.   The   application   flags   the   database   indicating   intended   participation,   then   creates   at   least   one   full-text   catalog.  
   
    Enable   the   database   for   full-text   indexing   prior   to   adding   the  
    FullTextCatalog   object   to   the   containing   collection.   Note:   Create  
    and   connect   of   SQLServer   object   used   is   not   illustrated   in   this  
    example.  
  oSQLServer.Databases("Northwind").EnableFullTextCatalogs  
   
    Create   a   Microsoft   Search   full-text   catalog.  
  Dim   oFullTextCatalog   As   New   SQLDMO.FullTextCatalog  
  oFullTextCatalog.Name   =   "ftcatNorthwind"  
   
    Add   the   FullTextCatalog   object   to   the   collection,   creating   the  
    full-text   catalog   on   the   server.  
  oSQLServer.Databases("Northwind").FullTextCatalogs.Add   oFullTextCatalog  
   
  B.   Indexing   a   Table   for   Full-Text   Queries  
  This   example   illustrates   creating   a   full-text   index   on   a   column   in   a   SQL   Server   table.  
   
  Dim   oTable   As   SQLDMO.Table  
   
    Get   the   Table   object   referencing   the   Northwind..Employees   table.  
    Note:   Create   and   connect   of   SQLServer   object   used   is   not   illustrated  
    in   this   example.  
  Set   oTable   =   oSQLServer.Databases("Northwind").Tables("Employees")  
   
    Indicate   that   Employees   will   be   full-text   indexed   and   use   the  
    Microsoft   Search   full-text   catalog   created   in   an   earlier   example.  
  oTable.FullTextCatalogName   =   "ftcatNorthwind"  
  oTable.UniqueIndexForFullText   =   "PK_Employees"  
  oTable.FullTextIndex   =   True  
   
    Index   the   Notes   column.  
  oTable.Columns("Notes").FullTextIndex   =   True  
   
    Activate   the   full-text   index   on   the   table.  
  oTable.FullTextIndexActive   =   True  
   
  C.   Populating   a   Full-Text   Catalog  
  This   example   illustrates   launching   a   full   population   on   an   existing   Microsoft   Search   full-text   catalog.  
   
    Perform   a   full   population   on   the   Microsoft   Search   full-text  
    index   catalog   created   in   an   earlier   example.   Note:   Create   and   connect  
    of   SQLServer   object   used   is   not   illustrated   in   this   example.  
  Set   oFullTextCatalog   =   _  
          oSQLServer.Databases("Northwind").FullTextCatalogs("ftcatNorthwind")  
   
          oFullTextCatalog.Start   (SQLDMOFullText_Full)  
   
   
   
  Note     Microsoft   Search   full-text   catalog   population   can   be   a   lengthy   task.   Applications   that   allow   full-text   catalog   population   should   display   a   busy   pointer   or   other   appropriate   interface   device   when   using   SQL-DMO   to   direct   full-text   catalog   population.  
   
   
  D.   Scheduling   Population   of   a   Full-Text   Catalog  
  When   using   SQL-DMO,   the   you   can   implement   scheduled   population   of   a   Microsoft   Search   full-text   catalog   by   creating   a   SQL   Server   Agent   job.   The   step(s)   of   the   job   execute   a   Transact-SQL   command   batch   directing   catalog   population.  
   
  This   example   illustrates   creating   a   job   that   schedules   an   incremental   full-text   catalog   population   for   weekly   execution   at   1:00   A.M.   of   every   Sunday.  
   
  Dim   oJob   As   New   SQLDMO.Job  
  Dim   oJobSchedule   As   New   SQLDMO.JobSchedule  
   
  Dim   oJobStep   As   SQLDMO.JobStep  
  Dim   oFullTextCatalog   As   SQLDMO.FullTextCatalog  
   
  Dim   iStepID   As   Long  
  Dim   strDatabase   As   String  
  Dim   strExecP1,   strExecP2   As   String  
   
  Dim   StartYear   As   String  
  Dim   StartMonth   As   String  
  Dim   StartDay   As   String  
   
  strDatabase   =   "Northwind"  
   
    Transact-SQL   command   batch   implementing   incremental   population  
    for   a   Microsoft   Search   full-text   catalog.  
  strExecP1   =   "EXEC   sp_fulltext_catalog   "  
  strExecP2   =   ",   start_incremental"  
   
    Create   the   SQL   Server   Agent   job.   Job   name   format   and   category  
    designation   allow   job   to   appear   as   a   schedule   property   of   the  
    catalog   when   the   catalog   is   viewed   in   SQL   Server   Enterprise   Manager.  
    Note:   Create   and   connect   of   SQLServer   object   used   not   illustrated   in  
    this   example.  
  oJob.Name   =   "Start_Incremental   on   Northwind.ftcatNorthwind.["   &   _  
          oSQLServer.Databases("Northwind").ID   &   _  
          "."   &   _  
          oSQLServer.Databases("Northwind").FullTextCatalogs(1).FullText  
          CatalogID   &   _"]"  
  oJob.Category   =   "Full-Text"  
  oSQLServer.JobServer.Jobs.Add   oJob  
           
    Alter   the   job,   adding   a   step   populating   each   full-text   catalog  
    defined.  
  oJob.BeginAlter  
  iStepID   =   1  
  For   Each   oFullTextCatalog   In   _  
          oSQLServer.Databases("Northwind").FullTextCatalogs  
   
          Set   oJobStep   =   New   SQLDMO.JobStep  
          oJobStep.Name   =   "Northwind_FullText_Incremental_"   &   iStepID  
          oJobStep.DatabaseName   =   strDatabase  
          oJobStep.SubSystem   =   "TSQL"  
          oJobStep.Command   =   strExecP1   &   oFullTextCatalog.Name   &   strExecP2  
          oJobStep.OnFailAction   =   SQLDMOJobStepAction_QuitWithFailure  
          oJobStep.OnSuccessAction   =   SQLDMOJobStepAction_GotoNextStep  
          oJobStep.StepID   =   iStepID  
   
          oJob.JobSteps.Add   oJobStep  
          iStepID   =   iStepID   +   1  
  Next   oFullTextCatalog  
   
  oJob.JobSteps(oJob.JobSteps.Count).OnSuccessAction   =   _  
          SQLDMOJobStepAction_QuitWithSuccess  
  oJob.StartStepID   =   1  
  oJob.DoAlter  
   
    Alter   the   job,   adding   a   schedule   for   full-text   catalog   population.  
  oJobSchedule.Name   =   "Northwind_FullText_Incremental"  
   
    Schedule   start   date   is   todays   date.   Build   the   string   representing  
    the   date   for   SQL-DMO.  
  StartYear   =   DatePart("yyyy",   Date)  
  StartMonth   =   DatePart("m",   Date)  
  StartDay   =   DatePart("d",   Date)  
   
  If   Len(StartMonth)   <   2   Then   StartMonth   =   "0"   &   StartMonth  
  If   Len(StartDay)   <   2   Then   StartDay   =   "0"   &   StartDay  
   
  oJobSchedule.Schedule.ActiveStartDate   =   StartYear   &   StartMonth   &   _  
          StartDay  
   
    Schedule   execution   for   once,   each   Sunday   at   1:00   AM.  
  oJobSchedule.Schedule.ActiveStartTimeOfDay   =   "10000"  
  oJobSchedule.Schedule.FrequencyInterval   =   SQLDMOWeek_Sunday  
   
  oJobSchedule.Schedule.FrequencyType   =   SQLDMOFreq_Weekly  
  oJobSchedule.Schedule.FrequencyRecurrenceFactor   =   1  
   
    Schedule   never   expires.  
  oJobSchedule.Schedule.ActiveEndDate   =   SQLDMO_NOENDDATE  
  oJobSchedule.Schedule.ActiveEndTimeOfDay   =   SQLDMO_NOENDTIME  
   
  oJob.BeginAlter  
  oJob.JobSchedules.Add   oJobSchedule  
  oJob.DoAlter  
   
    Target   the   local   server   to   enable   the   job.  
  oJob.ApplyToTargetServer   ("(Local)")  
   
 

NO.3   作者: lihonggen0

最好看一下SQL   SERVER的帮助

NO.4   作者: lxy_winner

A.   Creating   a   Microsoft   Search   Full-Text   Catalog  
  The   example   illustrates   enabling   a   Microsoft&reg;   SQL   Server&#8482;   database   for   participation   in   Microsoft   Search-supported   full-text   indexing   and   query.   Enabling   a   database   is   a   two-step   process.   The   application   flags   the   database   indicating   intended   participation,   then   creates   at   least   one   full-text   catalog.  
   
    Enable   the   database   for   full-text   indexing   prior   to   adding   the  
    FullTextCatalog   object   to   the   containing   collection.   Note:   Create  
    and   connect   of   SQLServer   object   used   is   not   illustrated   in   this  
    example.  
  oSQLServer.Databases("Northwind").EnableFullTextCatalogs  
   
    Create   a   Microsoft   Search   full-text   catalog.  
  Dim   oFullTextCatalog   As   New   SQLDMO.FullTextCatalog  
  oFullTextCatalog.Name   =   "ftcatNorthwind"  
   
    Add   the   FullTextCatalog   object   to   the   collection,   creating   the  
    full-text   catalog   on   the   server.  
  oSQLServer.Databases("Northwind").FullTextCatalogs.Add   oFullTextCatalog  
   
  B.   Indexing   a   Table   for   Full-Text   Queries  
  This   example   illustrates   creating   a   full-text   index   on   a   column   in   a   SQL   Server   table.  
   
  Dim   oTable   As   SQLDMO.Table  
   
    Get   the   Table   object   referencing   the   Northwind..Employees   table.  
    Note:   Create   and   connect   of   SQLServer   object   used   is   not   illustrated  
    in   this   example.  
  Set   oTable   =   oSQLServer.Databases("Northwind").Tables("Employees")  
   
    Indicate   that   Employees   will   be   full-text   indexed   and   use   the  
    Microsoft   Search   full-text   catalog   created   in   an   earlier   example.  
  oTable.FullTextCatalogName   =   "ftcatNorthwind"  
  oTable.UniqueIndexForFullText   =   "PK_Employees"  
  oTable.FullTextIndex   =   True  
   
    Index   the   Notes   column.  
  oTable.Columns("Notes").FullTextIndex   =   True  
   
    Activate   the   full-text   index   on   the   table.  
  oTable.FullTextIndexActive   =   True  
   
  C.   Populating   a   Full-Text   Catalog  
  This   example   illustrates   launching   a   full   population   on   an   existing   Microsoft   Search   full-text   catalog.  
   
    Perform   a   full   population   on   the   Microsoft   Search   full-text  
    index   catalog   created   in   an   earlier   example.   Note:   Create   and   connect  
    of   SQLServer   object   used   is   not   illustrated   in   this   example.  
  Set   oFullTextCatalog   =   _  
          oSQLServer.Databases("Northwind").FullTextCatalogs("ftcatNorthwind")  
   
          oFullTextCatalog.Start   (SQLDMOFullText_Full)  
   
   
   
  Note     Microsoft   Search   full-text   catalog   population   can   be   a   lengthy   task.   Applications   that   allow   full-text   catalog   population   should   display   a   busy   pointer   or   other   appropriate   interface   device   when   using   SQL-DMO   to   direct   full-text   catalog   population.  
   
   
  D.   Scheduling   Population   of   a   Full-Text   Catalog  
  When   using   SQL-DMO,   the   you   can   implement   scheduled   population   of   a   Microsoft   Search   full-text   catalog   by   creating   a   SQL   Server   Agent   job.   The   step(s)   of   the   job   execute   a   Transact-SQL   command   batch   directing   catalog   population.  
   
  This   example   illustrates   creating   a   job   that   schedules   an   incremental   full-text   catalog   population   for   weekly   execution   at   1:00   A.M.   of   every   Sunday.  
   
  Dim   oJob   As   New   SQLDMO.Job  
  Dim   oJobSchedule   As   New   SQLDMO.JobSchedule  
   
  Dim   oJobStep   As   SQLDMO.JobStep  
  Dim   oFullTextCatalog   As   SQLDMO.FullTextCatalog  
   
  Dim   iStepID   As   Long  
  Dim   strDatabase   As   String  
  Dim   strExecP1,   strExecP2   As   String  
   
  Dim   StartYear   As   String  
  Dim   StartMonth   As   String  
  Dim   StartDay   As   String  
   
  strDatabase   =   "Northwind"  
   
    Transact-SQL   command   batch   implementing   incremental   population  
    for   a   Microsoft   Search   full-text   catalog.  
  strExecP1   =   "EXEC   sp_fulltext_catalog   "  
  strExecP2   =   ",   start_incremental"  
   
    Create   the   SQL   Server   Agent   job.   Job   name   format   and   category  
    designation   allow   job   to   appear   as   a   schedule   property   of   the  
    catalog   when   the   catalog   is   viewed   in   SQL   Server   Enterprise   Manager.  
    Note:   Create   and   connect   of   SQLServer   object   used   not   illustrated   in  
    this   example.  
  oJob.Name   =   "Start_Incremental   on   Northwind.ftcatNorthwind.["   &   _  
          oSQLServer.Databases("Northwind").ID   &   _  
          "."   &   _  
          oSQLServer.Databases("Northwind").FullTextCatalogs(1).FullText  
          CatalogID   &   _"]"  
  oJob.Category   =   "Full-Text"  
  oSQLServer.JobServer.Jobs.Add   oJob  
           
    Alter   the   job,   adding   a   step   populating   each   full-text   catalog  
    defined.  
  oJob.BeginAlter  
  iStepID   =   1  
  For   Each   oFullTextCatalog   In   _  
          oSQLServer.Databases("Northwind").FullTextCatalogs  
   
          Set   oJobStep   =   New   SQLDMO.JobStep  
          oJobStep.Name   =   "Northwind_FullText_Incremental_"   &   iStepID  
          oJobStep.DatabaseName   =   strDatabase  
          oJobStep.SubSystem   =   "TSQL"  
          oJobStep.Command   =   strExecP1   &   oFullTextCatalog.Name   &   strExecP2  
          oJobStep.OnFailAction   =   SQLDMOJobStepAction_QuitWithFailure  
          oJobStep.OnSuccessAction   =   SQLDMOJobStepAction_GotoNextStep  
          oJobStep.StepID   =   iStepID  
   
          oJob.JobSteps.Add   oJobStep  
          iStepID   =   iStepID   +   1  
  Next   oFullTextCatalog  
   
  oJob.JobSteps(oJob.JobSteps.Count).OnSuccessAction   =   _  
          SQLDMOJobStepAction_QuitWithSuccess  
  oJob.StartStepID   =   1  
  oJob.DoAlter  
   
    Alter   the   job,   adding   a   schedule   for   full-text   catalog   population.  
  oJobSchedule.Name   =   "Northwind_FullText_Incremental"  
   
    Schedule   start   date   is   todays   date.   Build   the   string   representing  
    the   date   for   SQL-DMO.  
  StartYear   =   DatePart("yyyy",   Date)  
  StartMonth   =   DatePart("m",   Date)  
  StartDay   =   DatePart("d",   Date)  
   
  If   Len(StartMonth)   <   2   Then   StartMonth   =   "0"   &   StartMonth  
  If   Len(StartDay)   <   2   Then   StartDay   =   "0"   &   StartDay  
   
  oJobSchedule.Schedule.ActiveStartDate   =   StartYear   &   StartMonth   &   _  
          StartDay  
   
    Schedule   execution   for   once,   each   Sunday   at   1:00   AM.  
  oJobSchedule.Schedule.ActiveStartTimeOfDay   =   "10000"  
  oJobSchedule.Schedule.FrequencyInterval   =   SQLDMOWeek_Sunday  
   
  oJobSchedule.Schedule.FrequencyType   =   SQLDMOFreq_Weekly  
  oJobSchedule.Schedule.FrequencyRecurrenceFactor   =   1  
   
    Schedule   never   expires.  
  oJobSchedule.Schedule.ActiveEndDate   =   SQLDMO_NOENDDATE  
  oJobSchedule.Schedule.ActiveEndTimeOfDay   =   SQLDMO_NOENDTIME  
   
  oJob.BeginAlter  
  oJob.JobSchedules.Add   oJobSchedule  
  oJob.DoAlter  
   
    Target   the   local   server   to   enable   the   job.  
  oJob.ApplyToTargetServer   ("(Local)")  
     
 


 ·dbedit问题    »显示摘要«
    摘要: 程序里写 dbedit.text:=(某个值) 由于并没有写入内存,所以虽然dbedit显示出这个值,但保存还是保存不到后台数据库 请问怎么处理。? ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE