<%@ CodePage=1252 %> <% 'Include Common Files @1-C42A9701 %> <% 'End Include Common Files 'Initialize Page @1-9D532796 ' Variables Dim PathToRoot, ScriptPath, TemplateFilePath Dim FileName Dim Redirect Dim Tpl, HTMLTemplate Dim TemplateFileName Dim ComponentName Dim PathToCurrentPage Dim Attributes ' Events Dim CCSEvents Dim CCSEventResult ' Connections Dim DBsunshine ' Page controls Dim header1 Dim vu_awardsSearch Dim vu_awards Dim ChildControls Response.ContentType = CCSContentType Redirect = "" TemplateFileName = "past.html" Set CCSEvents = CreateObject("Scripting.Dictionary") PathToCurrentPage = "./" FileName = "past.asp" PathToRoot = "./" ScriptPath = Left(Request.ServerVariables("PATH_TRANSLATED"), Len(Request.ServerVariables("PATH_TRANSLATED")) - Len(FileName)) TemplateFilePath = ScriptPath 'End Initialize Page 'Initialize Objects @1-8762DBCA Set DBsunshine = New clsDBsunshine DBsunshine.Open Set Attributes = New clsAttributes ' Controls Set header1 = New clsheader1 Set header1.Attributes = Attributes header1.Initialize "header1", "" Set vu_awardsSearch = new clsRecordvu_awardsSearch Set vu_awards = New clsGridvu_awards vu_awardsSearch.Initialize DBsunshine vu_awards.Initialize DBsunshine ' Events %> <% BindEvents CCSEventResult = CCRaiseEvent(CCSEvents, "AfterInitialize", Nothing) 'End Initialize Objects 'Execute Components @1-C6732C49 header1.Operations vu_awardsSearch.Operation 'End Execute Components 'Go to destination page @1-6D35F4FD If NOT ( Redirect = "" ) Then UnloadPage Response.Redirect Redirect End If 'End Go to destination page 'Initialize HTML Template @1-2E9DB4BC CCSEventResult = CCRaiseEvent(CCSEvents, "OnInitializeView", Nothing) Set HTMLTemplate = new clsTemplate Set HTMLTemplate.Cache = TemplatesRepository HTMLTemplate.LoadTemplate TemplateFilePath & TemplateFileName HTMLTemplate.SetVar "@CCS_PathToRoot", PathToRoot Set Tpl = HTMLTemplate.Block("main") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Nothing) 'End Initialize HTML Template 'Show Page @1-495025B2 Attributes.Show HTMLTemplate, "page:" Set ChildControls = CCCreateCollection(Tpl, Null, ccsParseOverwrite, _ Array(header1, vu_awardsSearch, vu_awards)) ChildControls.Show Dim MainHTML HTMLTemplate.Parse "main", False MainHTML = HTMLTemplate.GetHTML("main") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeOutput", Nothing) If CCSEventResult Then Response.Write MainHTML 'End Show Page 'Unload Page @1-CB210C62 UnloadPage Set Tpl = Nothing Set HTMLTemplate = Nothing 'End Unload Page 'UnloadPage Sub @1-3EDA6CC5 Sub UnloadPage() CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeUnload", Nothing) If DBsunshine.State = adStateOpen Then _ DBsunshine.Close Set DBsunshine = Nothing Set CCSEvents = Nothing Set Attributes = Nothing Set header1 = Nothing Set vu_awardsSearch = Nothing Set vu_awards = Nothing End Sub 'End UnloadPage Sub Class clsRecordvu_awardsSearch 'vu_awardsSearch Class @4-6888FF6C 'vu_awardsSearch Variables @4-821EE5FC ' Public variables Public ComponentName Public HTMLFormAction Public PressedButton Public Errors Public FormSubmitted Public EditMode Public Visible Public Recordset Public TemplateBlock Public Attributes Public CCSEvents Private CCSEventResult Public InsertAllowed Public UpdateAllowed Public DeleteAllowed Public ReadAllowed Public DataSource Public Command Public ValidatingControls Public Controls ' Class variables Dim s_year_text Dim s_category Dim ClearParameters Dim Button_DoSearch 'End vu_awardsSearch Variables 'vu_awardsSearch Class_Initialize Event @4-C2D8618D Private Sub Class_Initialize() Visible = True Set Errors = New clsErrors Set CCSEvents = CreateObject("Scripting.Dictionary") Set Attributes = New clsAttributes Set DataSource = New clsvu_awardsSearchDataSource Set Command = New clsCommand InsertAllowed = False UpdateAllowed = False DeleteAllowed = False ReadAllowed = True Dim Method Dim OperationMode OperationMode = Split(CCGetFromGet("ccsForm", Empty), ":") If UBound(OperationMode) > -1 Then FormSubmitted = (OperationMode(0) = "vu_awardsSearch") End If If UBound(OperationMode) > 0 Then EditMode = (OperationMode(1) = "Edit") End If ComponentName = "vu_awardsSearch" Method = IIf(FormSubmitted, ccsPost, ccsGet) Set s_year_text = CCCreateList(ccsListBox, "s_year_text", Empty, ccsText, CCGetRequestParam("s_year_text", Method), Empty) s_year_text.BoundColumn = "year_text" s_year_text.TextColumn = "year_text" Set s_year_text.DataSource = CCCreateDataSource(dsTable,DBsunshine, Array("SELECT * " & _ "FROM years {SQL_Where} {SQL_OrderBy}", "", "year_text desc")) Set s_category = CCCreateList(ccsListBox, "s_category", Empty, ccsText, CCGetRequestParam("s_category", Method), Empty) s_category.BoundColumn = "category" s_category.TextColumn = "category" Set s_category.DataSource = CCCreateDataSource(dsTable,DBsunshine, Array("SELECT * " & _ "FROM category {SQL_Where} {SQL_OrderBy}", "", "")) Set ClearParameters = CCCreateControl(ccsLink, "ClearParameters", Empty, ccsText, Empty, CCGetRequestParam("ClearParameters", Method)) Set Button_DoSearch = CCCreateButton("Button_DoSearch", Method) Set ValidatingControls = new clsControls ValidatingControls.addControls Array(s_year_text, s_category) End Sub 'End vu_awardsSearch Class_Initialize Event 'vu_awardsSearch Initialize Method @4-36D27969 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection With DataSource End With End Sub 'End vu_awardsSearch Initialize Method 'vu_awardsSearch Class_Terminate Event @4-0C5D276C Private Sub Class_Terminate() Set Errors = Nothing Set Attributes = Nothing End Sub 'End vu_awardsSearch Class_Terminate Event 'vu_awardsSearch Validate Method @4-B9D513CF Function Validate() Dim Validation ValidatingControls.Validate CCSEventResult = CCRaiseEvent(CCSEvents, "OnValidate", Me) Validate = ValidatingControls.isValid() And (Errors.Count = 0) End Function 'End vu_awardsSearch Validate Method 'vu_awardsSearch Operation Method @4-A3BC3C29 Sub Operation() If NOT ( Visible AND FormSubmitted ) Then Exit Sub If FormSubmitted Then PressedButton = "Button_DoSearch" If Button_DoSearch.Pressed Then PressedButton = "Button_DoSearch" End If End If Redirect = "past.asp" If Validate() Then If PressedButton = "Button_DoSearch" Then If NOT Button_DoSearch.OnClick() Then Redirect = "" Else Redirect = "past.asp?" & CCGetQueryString("Form", Array(PressedButton, "ccsForm", "Button_DoSearch.x", "Button_DoSearch.y", "Button_DoSearch")) End If End If Else Redirect = "" End If End Sub 'End vu_awardsSearch Operation Method 'vu_awardsSearch Show Method @4-085AC6B4 Sub Show(Tpl) If NOT Visible Then Exit Sub CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) EditMode = Recordset.EditMode(ReadAllowed) HTMLFormAction = FileName & "?" & CCAddParam(Request.ServerVariables("QUERY_STRING"), "ccsForm", "vu_awardsSearch" & IIf(EditMode, ":Edit", "")) Set TemplateBlock = Tpl.Block("Record " & ComponentName) If TemplateBlock is Nothing Then Exit Sub TemplateBlock.Variable("HTMLFormName") = ComponentName TemplateBlock.Variable("HTMLFormEnctype") ="application/x-www-form-urlencoded" If DataSource.Errors.Count > 0 Then Errors.AddErrors(DataSource.Errors) DataSource.Errors.Clear With TemplateBlock.Block("Error") .Variable("Error") = Errors.ToString .Parse False End With End If Set Controls = CCCreateCollection(TemplateBlock, Null, ccsParseOverwrite, _ Array(s_year_text, s_category, ClearParameters, Button_DoSearch)) If EditMode AND ReadAllowed Then If Errors.Count = 0 Then If Recordset.Errors.Count > 0 Then With TemplateBlock.Block("Error") .Variable("Error") = Recordset.Errors.ToString .Parse False End With ElseIf Recordset.CanPopulate() Then If Not FormSubmitted Then End If Else EditMode = False End If End If If EditMode Then End If End If ClearParameters.Parameters = CCGetQueryString("QueryString", Array("s_year_text", "s_category", "ccsForm")) ClearParameters.Page = "past.asp" If Not FormSubmitted Then End If If FormSubmitted Then Errors.AddErrors s_year_text.Errors Errors.AddErrors s_category.Errors Errors.AddErrors DataSource.Errors With TemplateBlock.Block("Error") .Variable("Error") = Errors.ToString() .Parse False End With End If TemplateBlock.Variable("Action") = IIF(CCSUseAmps, Replace(HTMLFormAction, "&", CCSAmps), HTMLFormAction) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If Visible Then Attributes.Show TemplateBlock, "vu_awardsSearch" & ":" Controls.Show End If End Sub 'End vu_awardsSearch Show Method End Class 'End vu_awardsSearch Class @4-A61BA892 Class clsvu_awardsSearchDataSource 'vu_awardsSearchDataSource Class @4-C08AD153 'DataSource Variables @4-51A7ED8F Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders, StaticOrder Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Public InsertOmitIfEmpty Public UpdateOmitIfEmpty Private CurrentOperation Private CCSEventResult ' Datasource fields 'End DataSource Variables 'DataSource Class_Initialize Event @4-0F005A69 Private Sub Class_Initialize() Set CCSEvents = CreateObject("Scripting.Dictionary") Set Fields = New clsFields Set Recordset = New clsDataSource Set Recordset.DataSource = Me Set Errors = New clsErrors Set Connection = Nothing AllParamsSet = True Fields.AddFields Array() SQL = "SELECT * " & vbLf & _ "FROM years {SQL_Where} {SQL_OrderBy}" Where = "" Order = "year_text desc" StaticOrder = "" End Sub 'End DataSource Class_Initialize Event 'BuildTableWhere Method @4-98E5A92F Public Sub BuildTableWhere() End Sub 'End BuildTableWhere Method 'Open Method @4-5DD0F01A Function Open(Cmd) Errors.Clear If Connection Is Nothing Then Set Open = New clsEmptyDataSource Exit Function End If Set Cmd.Connection = Connection Cmd.CommandOperation = cmdOpen Cmd.PageSize = PageSize Cmd.ActivePage = AbsolutePage Cmd.CommandType = dsTable CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me) Cmd.SQL = SQL Cmd.Where = Where Cmd.OrderBy = Order If(Len(StaticOrder)>0) Then If Len(Order)>0 Then Cmd.OrderBy = ", "+Cmd.OrderBy Cmd.OrderBy = StaticOrder + Cmd.OrderBy End If Cmd.Options("TOP") = True If Not AllParamsSet Then Set Open = New clsEmptyDataSource Exit Function End If CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me) If Errors.Count = 0 And CCSEventResult Then _ Set Recordset = Cmd.Exec(Errors) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me) Set Recordset.FieldsCollection = Fields Set Open = Recordset End Function 'End Open Method 'DataSource Class_Terminate Event @4-41B4B08D Private Sub Class_Terminate() If Recordset.State = adStateOpen Then _ Recordset.Close Set Recordset = Nothing Set Parameters = Nothing Set Errors = Nothing End Sub 'End DataSource Class_Terminate Event End Class 'End vu_awardsSearchDataSource Class @4-A61BA892 Class clsGridvu_awards 'vu_awards Class @3-C68D38BD 'vu_awards Variables @3-2506B82B ' Private variables Private VarPageSize ' Public variables Public ComponentName, CCSEvents Public Visible, Errors Public DataSource Public PageNumber Public Command Public TemplateBlock Public IsDSEmpty Public ForceIteration Public Attributes Private ShownRecords Public ActiveSorter, SortingDirection Public Recordset Private CCSEventResult ' Grid Controls Public StaticControls, RowControls Dim vu_awards_TotalRecords Dim Sorter_year_text Dim Sorter_category Dim Sorter_name Dim Sorter_title Dim Sorter_song Dim Sorter_country Dim Sorter_winner Dim year_text Dim category Dim name Dim title Dim song Dim country Dim winner Dim Navigator 'End vu_awards Variables 'vu_awards Class_Initialize Event @3-81CA396A Private Sub Class_Initialize() ComponentName = "vu_awards" Visible = True Set CCSEvents = CreateObject("Scripting.Dictionary") Set Attributes = New clsAttributes Set Errors = New clsErrors Set DataSource = New clsvu_awardsDataSource Set Command = New clsCommand PageSize = CCGetParam(ComponentName & "PageSize", Empty) If IsNumeric(PageSize) And Len(PageSize) > 0 Then If PageSize <= 0 Then Errors.AddError(CCSLocales.GetText("CCS_GridPageSizeError", Empty)) If PageSize > 100 Then PageSize = 100 End If If NOT IsNumeric(PageSize) OR IsEmpty(PageSize) Then _ PageSize = 15 _ Else _ PageSize = CInt(PageSize) PageNumber = CCGetParam(ComponentName & "Page", 1) If Not IsNumeric(PageNumber) And Len(PageNumber) > 0 Then Errors.AddError(CCSLocales.GetText("CCS_GridPageNumberError", Empty)) PageNumber = 1 ElseIf Len(PageNumber) > 0 Then If PageNumber > 0 Then PageNumber = CInt(PageNumber) Else Errors.AddError(CCSLocales.GetText("CCS_GridPageNumberError", Empty)) PageNumber = 1 End If Else PageNumber = 1 End If ActiveSorter = CCGetParam("vu_awardsOrder", Empty) SortingDirection = CCGetParam("vu_awardsDir", Empty) If NOT(SortingDirection = "ASC" OR SortingDirection = "DESC") Then _ SortingDirection = Empty Set vu_awards_TotalRecords = CCCreateControl(ccsLabel, "vu_awards_TotalRecords", Empty, ccsText, Empty, CCGetRequestParam("vu_awards_TotalRecords", ccsGet)) Set Sorter_year_text = CCCreateSorter("Sorter_year_text", Me, FileName) Set Sorter_category = CCCreateSorter("Sorter_category", Me, FileName) Set Sorter_name = CCCreateSorter("Sorter_name", Me, FileName) Set Sorter_title = CCCreateSorter("Sorter_title", Me, FileName) Set Sorter_song = CCCreateSorter("Sorter_song", Me, FileName) Set Sorter_country = CCCreateSorter("Sorter_country", Me, FileName) Set Sorter_winner = CCCreateSorter("Sorter_winner", Me, FileName) Set year_text = CCCreateControl(ccsLabel, "year_text", Empty, ccsText, Empty, CCGetRequestParam("year_text", ccsGet)) Set category = CCCreateControl(ccsLabel, "category", Empty, ccsText, Empty, CCGetRequestParam("category", ccsGet)) Set name = CCCreateControl(ccsLabel, "name", Empty, ccsText, Empty, CCGetRequestParam("name", ccsGet)) Set title = CCCreateControl(ccsLabel, "title", Empty, ccsText, Empty, CCGetRequestParam("title", ccsGet)) Set song = CCCreateControl(ccsLabel, "song", Empty, ccsText, Empty, CCGetRequestParam("song", ccsGet)) Set country = CCCreateControl(ccsLabel, "country", Empty, ccsText, Empty, CCGetRequestParam("country", ccsGet)) Set winner = CCCreateControl(ccsLabel, "winner", Empty, ccsBoolean, DefaultBooleanFormat, CCGetRequestParam("winner", ccsGet)) Set Navigator = CCCreateNavigator(ComponentName, "Navigator", FileName, 10, tpCentered) IsDSEmpty = True End Sub 'End vu_awards Class_Initialize Event 'vu_awards Initialize Method @3-2AEA3975 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection DataSource.PageSize = PageSize DataSource.SetOrder ActiveSorter, SortingDirection DataSource.AbsolutePage = PageNumber End Sub 'End vu_awards Initialize Method 'vu_awards Class_Terminate Event @3-B97CC660 Private Sub Class_Terminate() Set CCSEvents = Nothing Set DataSource = Nothing Set Command = Nothing Set Errors = Nothing Set Attributes = Nothing End Sub 'End vu_awards Class_Terminate Event 'vu_awards Show Method @3-3FCF71A6 Sub Show(Tpl) Dim HasNext If NOT Visible Then Exit Sub Dim RowBlock With DataSource .Parameters("urls_year_text") = CCGetRequestParam("s_year_text", ccsGET) .Parameters("urls_category") = CCGetRequestParam("s_category", ccsGET) End With CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) If DataSource.Errors.Count = 0 Then IsDSEmpty = Recordset.EOF Set TemplateBlock = Tpl.Block("Grid " & ComponentName) If TemplateBlock is Nothing Then Exit Sub Set RowBlock = TemplateBlock.Block("Row") Set StaticControls = CCCreateCollection(TemplateBlock, Null, ccsParseOverwrite, _ Array(vu_awards_TotalRecords, Sorter_year_text, Sorter_category, Sorter_name, Sorter_title, Sorter_song, Sorter_country, Sorter_winner, Navigator)) Navigator.SetDataSource Recordset Set RowControls = CCCreateCollection(RowBlock, Null, ccsParseAccumulate, _ Array(year_text, category, name, title, song, country, winner)) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If NOT Visible Then Exit Sub RowControls.PreserveControlsVisible Errors.AddErrors DataSource.Errors If Errors.Count > 0 Then TemplateBlock.HTML = CCFormatError("Grid " & ComponentName, Errors) Else ' Show NoRecords block if no records are found If Recordset.EOF Then Attributes.Show TemplateBlock, "vu_awards:" TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite End If HasNext = HasNextRow() ForceIteration = False Do While ForceIteration Or HasNext Attributes("rowNumber") = ShownRecords + 1 If HasNext Then year_text.Value = Recordset.Fields("year_text") category.Value = Recordset.Fields("category") name.Value = Recordset.Fields("name") title.Value = Recordset.Fields("title") song.Value = Recordset.Fields("song") country.Value = Recordset.Fields("country") winner.Value = Recordset.Fields("winner") End If CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) Attributes.Show TemplateBlock.Block("Row"), "vu_awards:" RowControls.Show If HasNext Then Recordset.MoveNext ShownRecords = ShownRecords + 1 HasNext = HasNextRow() Loop Attributes.Show TemplateBlock, "vu_awards:" StaticControls.Show End If End Sub 'End vu_awards Show Method 'vu_awards PageSize Property Let @3-54E46DD6 Public Property Let PageSize(NewValue) VarPageSize = NewValue DataSource.PageSize = NewValue End Property 'End vu_awards PageSize Property Let 'vu_awards PageSize Property Get @3-9AA1D1E9 Public Property Get PageSize() PageSize = VarPageSize End Property 'End vu_awards PageSize Property Get 'vu_awards RowNumber Property Get @3-F32EE2C6 Public Property Get RowNumber() RowNumber = ShownRecords + 1 End Property 'End vu_awards RowNumber Property Get 'vu_awards HasNextRow Function @3-9BECE27A Public Function HasNextRow() HasNextRow = NOT Recordset.EOF AND ShownRecords < PageSize End Function 'End vu_awards HasNextRow Function End Class 'End vu_awards Class @3-A61BA892 Class clsvu_awardsDataSource 'vu_awardsDataSource Class @3-A8A9466C 'DataSource Variables @3-FBD200AC Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders, StaticOrder Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Public InsertOmitIfEmpty Public UpdateOmitIfEmpty Private CurrentOperation Private CCSEventResult ' Datasource fields Public year_text Public category Public name Public title Public song Public country Public winner 'End DataSource Variables 'DataSource Class_Initialize Event @3-D887DB27 Private Sub Class_Initialize() Set CCSEvents = CreateObject("Scripting.Dictionary") Set Fields = New clsFields Set Recordset = New clsDataSource Set Recordset.DataSource = Me Set Errors = New clsErrors Set Connection = Nothing AllParamsSet = True Set year_text = CCCreateField("year_text", "year_text", ccsText, Empty, Recordset) Set category = CCCreateField("category", "category", ccsText, Empty, Recordset) Set name = CCCreateField("name", "name", ccsText, Empty, Recordset) Set title = CCCreateField("title", "title", ccsText, Empty, Recordset) Set song = CCCreateField("song", "song", ccsText, Empty, Recordset) Set country = CCCreateField("country", "country", ccsText, Empty, Recordset) Set winner = CCCreateField("winner", "winner", ccsBoolean, Array(1, 0, Empty), Recordset) Fields.AddFields Array(year_text, category, name, title, song, country, winner) Set Parameters = Server.CreateObject("Scripting.Dictionary") Set WhereParameters = Nothing Orders = Array( _ Array("Sorter_year_text", "year_text", ""), _ Array("Sorter_category", "category", ""), _ Array("Sorter_name", "name", ""), _ Array("Sorter_title", "title", ""), _ Array("Sorter_song", "song", ""), _ Array("Sorter_country", "country", ""), _ Array("Sorter_winner", "winner", "")) SQL = "SELECT TOP {SqlParam_endRecord} * " & vbLf & _ "FROM vu_awards {SQL_Where} {SQL_OrderBy}" CountSQL = "SELECT COUNT(*) " & vbLf & _ "FROM vu_awards" Where = "" Order = "year_text desc" StaticOrder = "" End Sub 'End DataSource Class_Initialize Event 'SetOrder Method @3-68FC9576 Sub SetOrder(Column, Direction) Order = Recordset.GetOrder(Order, Column, Direction, Orders) End Sub 'End SetOrder Method 'BuildTableWhere Method @3-B16DD0B4 Public Sub BuildTableWhere() Dim WhereParams If Not WhereParameters Is Nothing Then _ Exit Sub Set WhereParameters = new clsSQLParameters With WhereParameters Set .Connection = Connection Set .ParameterSources = Parameters Set .DataSource = Me .AddParameter 1, "urls_year_text", ccsText, Empty, Empty, Empty, False .AddParameter 2, "urls_category", ccsText, Empty, Empty, Empty, False .Criterion(1) = .Operation(opContains, False, "year_text", .getParamByID(1)) .Criterion(2) = .Operation(opContains, False, "category", .getParamByID(2)) .AssembledWhere = .opAND(False, .Criterion(1), .Criterion(2)) WhereParams = .AssembledWhere If Len(Where) > 0 Then If Len(WhereParams) > 0 Then _ Where = Where & " AND " & WhereParams Else If Len(WhereParams) > 0 Then _ Where = WhereParams End If End With End Sub 'End BuildTableWhere Method 'Open Method @3-40984FC5 Function Open(Cmd) Errors.Clear If Connection Is Nothing Then Set Open = New clsEmptyDataSource Exit Function End If Set Cmd.Connection = Connection Cmd.CommandOperation = cmdOpen Cmd.PageSize = PageSize Cmd.ActivePage = AbsolutePage Cmd.CommandType = dsTable CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me) Cmd.SQL = SQL Cmd.CountSQL = CountSQL BuildTableWhere Cmd.Where = Where Cmd.OrderBy = Order If(Len(StaticOrder)>0) Then If Len(Order)>0 Then Cmd.OrderBy = ", "+Cmd.OrderBy Cmd.OrderBy = StaticOrder + Cmd.OrderBy End If Cmd.Options("TOP") = True CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me) If Errors.Count = 0 And CCSEventResult Then _ Set Recordset = Cmd.Exec(Errors) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me) Set Recordset.FieldsCollection = Fields Set Open = Recordset End Function 'End Open Method 'DataSource Class_Terminate Event @3-41B4B08D Private Sub Class_Terminate() If Recordset.State = adStateOpen Then _ Recordset.Close Set Recordset = Nothing Set Parameters = Nothing Set Errors = Nothing End Sub 'End DataSource Class_Terminate Event End Class 'End vu_awardsDataSource Class @3-A61BA892 'Include Page Implementation @2-04353812 %> <% 'End Include Page Implementation %>