public override ADOX.Table GetTable() { var table = new ADOX.Table(); table.Name = TableName; table.Columns.Append("RemoteHost"); table.Columns.Append("RemoteIdentity"); table.Columns.Append("RemoteUser"); table.Columns.Append("Time", DataTypeEnum.adDate); table.Columns.Append("Method"); table.Columns.Append("URL", DataTypeEnum.adLongVarWChar); table.Columns.Append("Protocol"); table.Columns.Append("Status", DataTypeEnum.adSmallInt); table.Columns.Append("BytesSent", DataTypeEnum.adInteger); table.Columns.Append("Referer", DataTypeEnum.adLongVarWChar); table.Columns.Append("UserAgent", DataTypeEnum.adLongVarWChar); // allow all columns to be empty foreach (ADOX.Column column in table.Columns) { column.Attributes = ColumnAttributesEnum.adColNullable; } var rhindex = new ADOX.Index(); rhindex.Name = "RemoteHost index"; rhindex.IndexNulls = AllowNullsEnum.adIndexNullsIgnore; rhindex.Columns.Append("RemoteHost"); table.Indexes.Append(rhindex); var mindex = new ADOX.Index(); mindex.Name = "Method index"; mindex.IndexNulls = AllowNullsEnum.adIndexNullsIgnore; mindex.Columns.Append("Method"); table.Indexes.Append(mindex); var tindex = new ADOX.Index(); tindex.Name = "Time index"; tindex.IndexNulls = AllowNullsEnum.adIndexNullsIgnore; tindex.Columns.Append("Time", DataTypeEnum.adDate); table.Indexes.Append(tindex); var sindex = new ADOX.Index(); sindex.Name = "Status index"; sindex.IndexNulls = AllowNullsEnum.adIndexNullsIgnore; sindex.Columns.Append("Status", DataTypeEnum.adSmallInt); table.Indexes.Append(sindex); return(table); }
public override ADOX.Table GetTable() { var table = new ADOX.Table(); table.Name = TableName; table.Columns.Append("RemoteHost"); table.Columns.Append("RemoteIdentity"); table.Columns.Append("RemoteUser"); table.Columns.Append("Time", DataTypeEnum.adDate); table.Columns.Append("Method"); table.Columns.Append("URL", DataTypeEnum.adLongVarWChar); table.Columns.Append("Protocol"); table.Columns.Append("Status", DataTypeEnum.adSmallInt); table.Columns.Append("BytesSent", DataTypeEnum.adInteger); table.Columns.Append("Referer", DataTypeEnum.adLongVarWChar); table.Columns.Append("UserAgent", DataTypeEnum.adLongVarWChar); // allow all columns to be empty foreach (ADOX.Column column in table.Columns) { column.Attributes = ColumnAttributesEnum.adColNullable; } var rhindex = new ADOX.Index(); rhindex.Name = "RemoteHost index"; rhindex.IndexNulls = AllowNullsEnum.adIndexNullsIgnore; rhindex.Columns.Append("RemoteHost"); table.Indexes.Append(rhindex); var mindex = new ADOX.Index(); mindex.Name = "Method index"; mindex.IndexNulls = AllowNullsEnum.adIndexNullsIgnore; mindex.Columns.Append("Method"); table.Indexes.Append(mindex); var tindex = new ADOX.Index(); tindex.Name = "Time index"; tindex.IndexNulls = AllowNullsEnum.adIndexNullsIgnore; tindex.Columns.Append("Time", DataTypeEnum.adDate); table.Indexes.Append(tindex); var sindex = new ADOX.Index(); sindex.Name = "Status index"; sindex.IndexNulls = AllowNullsEnum.adIndexNullsIgnore; sindex.Columns.Append("Status", DataTypeEnum.adSmallInt); table.Indexes.Append(sindex); return table; }