SQL-DMO Constants

SQL-DMO constants, implemented as enumerated data types, are visible through the type library. When constants are made visible in this fashion, automation controllers providing syntax completion enrich the development experience by providing available choices from an enumerated type.

Though the names of SQL-DMO constants can be quite long, and can represent a significant portion of automation script, consider using the constants whenever possible. Descriptive constant names are one tactic used to make self-documenting code a reality.

For example, the two statements below accomplish exactly the same task.

oSchedule.FrequencyInterval = 42

  

oSchedule.FrequencyInterval = (SQLDMOWeek_Monday Or _
   SQLDMOWeek_Wednesday Or SQLDMOWeek_Friday)

  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.