<%@ CodePage=1252 %> <% 'Include Common Files @1-07AFC038 %> <% 'End Include Common Files 'Initialize Page @1-149887D6 ' Variables Dim PathToRoot, ScriptPath, TemplateFilePath Dim FileName Dim Redirect Dim IsService Dim Tpl, HTMLTemplate Dim TemplateFileName Dim ComponentName Dim PathToCurrentPage Dim Attributes ' Events Dim CCSEvents Dim CCSEventResult ' Connections Dim DBInternet ' Page controls Dim Header Dim contactus Dim Footer Dim ChildControls Response.ContentType = CCSContentType IsService = False Redirect = "" TemplateFileName = "contact.html" Set CCSEvents = CreateObject("Scripting.Dictionary") PathToCurrentPage = "./" FileName = "contact.asp" PathToRoot = "./" ScriptPath = Left(Request.ServerVariables("PATH_TRANSLATED"), Len(Request.ServerVariables("PATH_TRANSLATED")) - Len(FileName)) TemplateFilePath = ScriptPath 'End Initialize Page 'Initialize Objects @1-3E3E9E1E BindEvents "Page" CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeInitialize", Nothing) Set DBInternet = New clsDBInternet DBInternet.Open Set Attributes = New clsAttributes Attributes("pathToRoot") = PathToRoot ' Controls Set Header = New clsHeader Set Header.Attributes = Attributes Header.Initialize "Header", "" Set contactus = new clsRecordcontactus Set Footer = New clsFooter Set Footer.Attributes = Attributes Footer.Initialize "Footer", "" contactus.Initialize DBInternet ' Events %> <% BindEvents Empty CCSEventResult = CCRaiseEvent(CCSEvents, "AfterInitialize", Nothing) 'End Initialize Objects 'Execute Components @1-47222103 Header.Operations contactus.Operation Footer.Operations '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-AB0170D7 Attributes.Show HTMLTemplate, "page:" Set ChildControls = CCCreateCollection(Tpl, Null, ccsParseOverwrite, _ Array(Header, contactus, Footer)) ChildControls.Show Dim MainHTML HTMLTemplate.Parse "main", False If IsEmpty(MainHTML) Then 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-34156DA1 Sub UnloadPage() CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeUnload", Nothing) If DBInternet.State = adStateOpen Then _ DBInternet.Close Set DBInternet = Nothing Set CCSEvents = Nothing Set Attributes = Nothing Header.UnloadPage Set Header = Nothing Set contactus = Nothing Footer.UnloadPage Set Footer = Nothing End Sub 'End UnloadPage Sub Class clsRecordcontactus 'contactus Class @4-271C5597 'contactus Variables @4-821840D6 ' 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 contact_name Dim contact_title Dim contact_Company Dim contact_address Dim contact_city Dim contact_state_id Dim contact_zip Dim contact_phone Dim contact_fax Dim contact_email Dim ip_address Dim comment Dim contact_date Dim Button_Insert Dim Button_Cancel 'End contactus Variables 'contactus Class_Initialize Event @4-9A588063 Private Sub Class_Initialize() Visible = True Set Errors = New clsErrors Set CCSEvents = CreateObject("Scripting.Dictionary") Set Attributes = New clsAttributes Set DataSource = New clscontactusDataSource Set Command = New clsCommand InsertAllowed = True UpdateAllowed = False DeleteAllowed = False ReadAllowed = False Dim Method Dim OperationMode OperationMode = Split(CCGetFromGet("ccsForm", Empty), ":") If UBound(OperationMode) > -1 Then FormSubmitted = (OperationMode(0) = "contactus") End If If UBound(OperationMode) > 0 Then EditMode = (OperationMode(1) = "Edit") End If ComponentName = "contactus" Method = IIf(FormSubmitted, ccsPost, ccsGet) Set contact_name = CCCreateControl(ccsTextBox, "contact_name", "Name", ccsText, Empty, CCGetRequestParam("contact_name", Method)) contact_name.Required = True Set contact_title = CCCreateControl(ccsTextBox, "contact_title", "Contact Title", ccsText, Empty, CCGetRequestParam("contact_title", Method)) Set contact_Company = CCCreateControl(ccsTextBox, "contact_Company", "Company Name", ccsText, Empty, CCGetRequestParam("contact_Company", Method)) contact_Company.Required = True Set contact_address = CCCreateControl(ccsTextBox, "contact_address", Empty, ccsText, Empty, CCGetRequestParam("contact_address", Method)) Set contact_city = CCCreateControl(ccsTextBox, "contact_city", "Contact City", ccsText, Empty, CCGetRequestParam("contact_city", Method)) Set contact_state_id = CCCreateList(ccsListBox, "contact_state_id", "Contact State Id", ccsInteger, CCGetRequestParam("contact_state_id", Method), Empty) contact_state_id.BoundColumn = "state_id" contact_state_id.TextColumn = "state_name" Set contact_state_id.DataSource = CCCreateDataSource(dsTable,DBInternet, Array("SELECT * " & _ "FROM states {SQL_Where} {SQL_OrderBy}", "", "")) Set contact_zip = CCCreateControl(ccsTextBox, "contact_zip", "Contact Zip", ccsText, Empty, CCGetRequestParam("contact_zip", Method)) contact_zip.InputMask = "^\d{5}$" Set contact_phone = CCCreateControl(ccsTextBox, "contact_phone", "Phone", ccsText, Empty, CCGetRequestParam("contact_phone", Method)) Set contact_fax = CCCreateControl(ccsTextBox, "contact_fax", "Contact Fax", ccsText, Empty, CCGetRequestParam("contact_fax", Method)) Set contact_email = CCCreateControl(ccsTextBox, "contact_email", "Email", ccsText, Empty, CCGetRequestParam("contact_email", Method)) Set ip_address = CCCreateControl(ccsHidden, "ip_address", Empty, ccsText, Empty, CCGetRequestParam("ip_address", Method)) Set comment = CCCreateControl(ccsTextArea, "comment", "Comment", ccsMemo, Empty, CCGetRequestParam("comment", Method)) comment.Required = True Set contact_date = CCCreateControl(ccsHidden, "contact_date", Empty, ccsDate, DefaultDateFormat, CCGetRequestParam("contact_date", Method)) Set Button_Insert = CCCreateButton("Button_Insert", Method) Set Button_Cancel = CCCreateButton("Button_Cancel", Method) Set ValidatingControls = new clsControls ValidatingControls.addControls Array(contact_name, contact_title, contact_Company, contact_address, contact_city, contact_state_id, contact_zip, _ contact_phone, contact_fax, contact_email, ip_address, comment, contact_date) If Not FormSubmitted Then If IsEmpty(contact_date.Value) Then _ contact_date.Value = Now End If End Sub 'End contactus Class_Initialize Event 'contactus Initialize Method @4-B44860EC Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection With DataSource .Parameters("urlcontact_id") = CCGetRequestParam("contact_id", ccsGET) End With End Sub 'End contactus Initialize Method 'contactus Class_Terminate Event @4-0C5D276C Private Sub Class_Terminate() Set Errors = Nothing Set Attributes = Nothing End Sub 'End contactus Class_Terminate Event 'contactus 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 contactus Validate Method 'contactus Operation Method @4-6940563A Sub Operation() If NOT ( Visible AND FormSubmitted ) Then Exit Sub If FormSubmitted Then PressedButton = "Button_Insert" If Button_Insert.Pressed Then PressedButton = "Button_Insert" ElseIf Button_Cancel.Pressed Then PressedButton = "Button_Cancel" End If End If Redirect = "default.asp?" & CCGetQueryString("QueryString", Array("ccsForm", "Button_Insert.x", "Button_Insert.y", "Button_Insert", "Button_Cancel.x", "Button_Cancel.y", "Button_Cancel")) If PressedButton = "Button_Cancel" Then If NOT Button_Cancel.OnClick Then Redirect = "" End If ElseIf Validate() Then If PressedButton = "Button_Insert" Then If NOT Button_Insert.OnClick() OR NOT InsertRow() Then Redirect = "" End If End If Else Redirect = "" End If End Sub 'End contactus Operation Method 'contactus InsertRow Method @4-6529CA44 Function InsertRow() CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeInsert", Me) If NOT InsertAllowed Then InsertRow = False : Exit Function DataSource.contact_name.Value = contact_name.Value DataSource.contact_title.Value = contact_title.Value DataSource.contact_Company.Value = contact_Company.Value DataSource.contact_address.Value = contact_address.Value DataSource.contact_city.Value = contact_city.Value DataSource.contact_state_id.Value = contact_state_id.Value DataSource.contact_zip.Value = contact_zip.Value DataSource.contact_phone.Value = contact_phone.Value DataSource.contact_fax.Value = contact_fax.Value DataSource.contact_email.Value = contact_email.Value DataSource.ip_address.Value = ip_address.Value DataSource.comment.Value = comment.Value DataSource.contact_date.Value = contact_date.Value DataSource.Insert(Command) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterInsert", Me) If DataSource.Errors.Count > 0 Then Errors.AddErrors(DataSource.Errors) DataSource.Errors.Clear End If InsertRow = (Errors.Count = 0) End Function 'End contactus InsertRow Method 'contactus Show Method @4-39410751 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", "contactus" & 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(contact_name, contact_title, contact_Company, contact_address, contact_city, contact_state_id, contact_zip, _ contact_phone, contact_fax, contact_email, ip_address, comment, contact_date, Button_Insert, Button_Cancel)) 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 contact_name.Value = Recordset.Fields("contact_name") contact_title.Value = Recordset.Fields("contact_title") contact_Company.Value = Recordset.Fields("contact_Company") contact_address.Value = Recordset.Fields("contact_address") contact_city.Value = Recordset.Fields("contact_city") contact_state_id.Value = Recordset.Fields("contact_state_id") contact_zip.Value = Recordset.Fields("contact_zip") contact_phone.Value = Recordset.Fields("contact_phone") contact_fax.Value = Recordset.Fields("contact_fax") contact_email.Value = Recordset.Fields("contact_email") ip_address.Value = Recordset.Fields("ip_address") comment.Value = Recordset.Fields("comment") contact_date.Value = Recordset.Fields("contact_date") End If Else EditMode = False End If End If End If If Not FormSubmitted Then End If If FormSubmitted Then Errors.AddErrors contact_name.Errors Errors.AddErrors contact_title.Errors Errors.AddErrors contact_Company.Errors Errors.AddErrors contact_address.Errors Errors.AddErrors contact_city.Errors Errors.AddErrors contact_state_id.Errors Errors.AddErrors contact_zip.Errors Errors.AddErrors contact_phone.Errors Errors.AddErrors contact_fax.Errors Errors.AddErrors contact_email.Errors Errors.AddErrors ip_address.Errors Errors.AddErrors comment.Errors Errors.AddErrors contact_date.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) Button_Insert.Visible = NOT EditMode AND InsertAllowed CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If Visible Then Attributes.Show TemplateBlock, "contactus" & ":" Controls.Show End If End Sub 'End contactus Show Method End Class 'End contactus Class @4-A61BA892 Class clscontactusDataSource 'contactusDataSource Class @4-2BC31B59 'DataSource Variables @4-0D11F727 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 contact_name Public contact_title Public contact_Company Public contact_address Public contact_city Public contact_state_id Public contact_zip Public contact_phone Public contact_fax Public contact_email Public ip_address Public comment Public contact_date 'End DataSource Variables 'DataSource Class_Initialize Event @4-013EA57E 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 contact_name = CCCreateField("contact_name", "contact_name", ccsText, Empty, Recordset) Set contact_title = CCCreateField("contact_title", "contact_title", ccsText, Empty, Recordset) Set contact_Company = CCCreateField("contact_Company", "contact_Company", ccsText, Empty, Recordset) Set contact_address = CCCreateField("contact_address", "contact_address", ccsText, Empty, Recordset) Set contact_city = CCCreateField("contact_city", "contact_city", ccsText, Empty, Recordset) Set contact_state_id = CCCreateField("contact_state_id", "contact_state_id", ccsInteger, Empty, Recordset) Set contact_zip = CCCreateField("contact_zip", "contact_zip", ccsText, Empty, Recordset) Set contact_phone = CCCreateField("contact_phone", "contact_phone", ccsText, Empty, Recordset) Set contact_fax = CCCreateField("contact_fax", "contact_fax", ccsText, Empty, Recordset) Set contact_email = CCCreateField("contact_email", "contact_email", ccsText, Empty, Recordset) Set ip_address = CCCreateField("ip_address", "ip_address", ccsText, Empty, Recordset) Set comment = CCCreateField("comment", "Question/Comment", ccsMemo, Empty, Recordset) Set contact_date = CCCreateField("contact_date", "date", ccsDate, Array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"), Recordset) Fields.AddFields Array(contact_name, contact_title, contact_Company, contact_address, contact_city, contact_state_id, contact_zip, _ contact_phone, contact_fax, contact_email, ip_address, comment, contact_date) Set InsertOmitIfEmpty = CreateObject("Scripting.Dictionary") InsertOmitIfEmpty.Add "contact_name", False InsertOmitIfEmpty.Add "contact_title", False InsertOmitIfEmpty.Add "contact_Company", False InsertOmitIfEmpty.Add "contact_address", False InsertOmitIfEmpty.Add "contact_city", False InsertOmitIfEmpty.Add "contact_state_id", False InsertOmitIfEmpty.Add "contact_zip", False InsertOmitIfEmpty.Add "contact_phone", False InsertOmitIfEmpty.Add "contact_fax", False InsertOmitIfEmpty.Add "contact_email", False InsertOmitIfEmpty.Add "ip_address", False InsertOmitIfEmpty.Add "comment", False InsertOmitIfEmpty.Add "contact_date", False Set Parameters = Server.CreateObject("Scripting.Dictionary") Set WhereParameters = Nothing SQL = "SELECT * " & vbLf & _ "FROM contactus {SQL_Where} {SQL_OrderBy}" Where = "" Order = "" StaticOrder = "" End Sub 'End DataSource Class_Initialize Event 'BuildTableWhere Method @4-E0C5BF0B 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, "urlcontact_id", ccsInteger, Empty, Empty, Empty, False AllParamsSet = .AllParamsSet .Criterion(1) = .Operation(opEqual, False, "contact_id", .getParamByID(1)) .AssembledWhere = .Criterion(1) 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 @4-48A2DA7D 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 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 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 'Insert Method @4-06DC1DCE Sub Insert(Cmd) CmdExecution = True CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildInsert", Me) Set Cmd.Connection = Connection Cmd.CommandOperation = cmdExec Cmd.CommandType = dsTable Cmd.CommandParameters = Empty Cmd.Prepared = True Dim IsDef_contact_name : IsDef_contact_name = CCIsDefined("contact_name", "Form") Dim IsDef_contact_title : IsDef_contact_title = CCIsDefined("contact_title", "Form") Dim IsDef_contact_Company : IsDef_contact_Company = CCIsDefined("contact_Company", "Form") Dim IsDef_contact_address : IsDef_contact_address = CCIsDefined("contact_address", "Form") Dim IsDef_contact_city : IsDef_contact_city = CCIsDefined("contact_city", "Form") Dim IsDef_contact_state_id : IsDef_contact_state_id = CCIsDefined("contact_state_id", "Form") Dim IsDef_contact_zip : IsDef_contact_zip = CCIsDefined("contact_zip", "Form") Dim IsDef_contact_phone : IsDef_contact_phone = CCIsDefined("contact_phone", "Form") Dim IsDef_contact_fax : IsDef_contact_fax = CCIsDefined("contact_fax", "Form") Dim IsDef_contact_email : IsDef_contact_email = CCIsDefined("contact_email", "Form") Dim IsDef_ip_address : IsDef_ip_address = CCIsDefined("ip_address", "Form") Dim IsDef_comment : IsDef_comment = CCIsDefined("comment", "Form") Dim IsDef_contact_date : IsDef_contact_date = CCIsDefined("contact_date", "Form") If Not InsertOmitIfEmpty("contact_name") Or IsDef_contact_name Then Cmd.AddSQLStrings "contact_name", Connection.ToSQL(contact_name, contact_name.DataType) If Not InsertOmitIfEmpty("contact_title") Or IsDef_contact_title Then Cmd.AddSQLStrings "contact_title", Connection.ToSQL(contact_title, contact_title.DataType) If Not InsertOmitIfEmpty("contact_Company") Or IsDef_contact_Company Then Cmd.AddSQLStrings "contact_Company", Connection.ToSQL(contact_Company, contact_Company.DataType) If Not InsertOmitIfEmpty("contact_address") Or IsDef_contact_address Then Cmd.AddSQLStrings "contact_address", Connection.ToSQL(contact_address, contact_address.DataType) If Not InsertOmitIfEmpty("contact_city") Or IsDef_contact_city Then Cmd.AddSQLStrings "contact_city", Connection.ToSQL(contact_city, contact_city.DataType) If Not InsertOmitIfEmpty("contact_state_id") Or IsDef_contact_state_id Then Cmd.AddSQLStrings "contact_state_id", Connection.ToSQL(contact_state_id, contact_state_id.DataType) If Not InsertOmitIfEmpty("contact_zip") Or IsDef_contact_zip Then Cmd.AddSQLStrings "contact_zip", Connection.ToSQL(contact_zip, contact_zip.DataType) If Not InsertOmitIfEmpty("contact_phone") Or IsDef_contact_phone Then Cmd.AddSQLStrings "contact_phone", Connection.ToSQL(contact_phone, contact_phone.DataType) If Not InsertOmitIfEmpty("contact_fax") Or IsDef_contact_fax Then Cmd.AddSQLStrings "contact_fax", Connection.ToSQL(contact_fax, contact_fax.DataType) If Not InsertOmitIfEmpty("contact_email") Or IsDef_contact_email Then Cmd.AddSQLStrings "contact_email", Connection.ToSQL(contact_email, contact_email.DataType) If Not InsertOmitIfEmpty("ip_address") Or IsDef_ip_address Then Cmd.AddSQLStrings "ip_address", Connection.ToSQL(ip_address, ip_address.DataType) If Not InsertOmitIfEmpty("comment") Or IsDef_comment Then Cmd.AddSQLStrings "[Question/Comment]", "?" If Not InsertOmitIfEmpty("contact_date") Or IsDef_contact_date Then Cmd.AddSQLStrings "[date]", Connection.ToSQL(contact_date, contact_date.DataType) CmdExecution = Cmd.PrepareSQL("Insert", "contactus", Empty) Cmd.CommandParameters = Array( _ IIF(IsDef_comment,Array("[Question/Comment]", adLongVarChar, adParamInput,2147483647, comment.Value), Empty) _ ) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteInsert", Me) If Errors.Count = 0 And CmdExecution Then Cmd.Exec(Errors) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteInsert", Me) End If End Sub 'End Insert Method End Class 'End contactusDataSource Class @4-A61BA892 'Include Page Implementation @2-A598DFC6 %> <% 'End Include Page Implementation 'Include Page Implementation @3-9D89A721 %> <% 'End Include Page Implementation %>