EventChronicle Constructor ()
Initializes a new EventChronicle.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public Sub New
public EventChronicle ()
public:
EventChronicle ()
public EventChronicle ()
public function EventChronicle ()
Remarks
Updated text:5 December 2005
Updated sample code:5 December 2005
If you use the default constructor, you must immediately set the Name property and then set the Parent property. You can then set other properties.
Example
The following examples show how to use this default constructor:
// Define a chronicle for the class
EventChronicle ec1 = new EventChronicle();
ec1.Name = "FlightEventChonicle";
ec1.Parent = flightEvents;
ec1.SqlStatements.Add("CREATE TABLE dbo.FlightEventChronicle " +
" (LeavingFrom nvarchar(6), GoingTo nvarchar(6), " +
" Price float);");
ec1.SqlStatements.Add("CREATE INDEX FlightEventChronicleIndex " +
"ON dbo.FlightEventChronicle " +
"( LeavingFrom, GoingTo );");
flightEvents.EventChronicles.Add(ec1);
' Define a chronicle for the class
Dim ec1 As EventChronicle = New EventChronicle()
ec1.Name = "FlightEventChonicle"
ec1.Parent = flightEvents
ec1.SqlStatements.Add("CREATE TABLE dbo.FlightEventChronicle " + _
" (LeavingFrom nvarchar(6), GoingTo nvarchar(6), " + _
" Price float);")
ec1.SqlStatements.Add("CREATE INDEX FlightEventChronicleIndex " + _
"ON dbo.FlightEventChronicle " + _
"( LeavingFrom, GoingTo );")
flightEvents.EventChronicles.Add(ec1)
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
See Also
Reference
EventChronicle Class
EventChronicle Members
Microsoft.SqlServer.Management.Nmo Namespace
Other Resources
Defining Chronicles for an Event Class
Chronicle Element for EventClass/Chronicles (ADF)