<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' *** Edit Operations: declare variables Dim MM_editAction Dim TM_abortEdit Dim TM_editQuery Dim TM_editCmd Dim TM_editConnection Dim TM_editTable Dim TM_editRedirectUrl Dim TM_editColumn Dim TM_recordId Dim TM_fieldsStr Dim TM_columnsStr Dim TM_fields Dim TM_columns Dim TM_typeArray Dim TM_formVal Dim TM_delim Dim TM_altVal Dim TM_emptyVal Dim TM_i TM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then TM_editAction = TM_editAction & "?" & Request.QueryString End If ' boolean to abort record edit TM_abortEdit = false ' query string to execute TM_editQuery = "" %> <% 'TFM_Insert-Retrieve ID ' *** Insert Record: set variables If (CStr(Request("MM_insert")) = "SendContact") Then TM_editConnection = MM_OSSsql_STRING TM_editTable = "dbo.Contact_Us_Center" TM_editRedirectUrl = "OSSContact2.asp" TM_fieldsStr = "FirstName|value|LastName|value|Address1|value|Address2|value|City|value|State|value|Zip|value|Phone|value|Moblie_Phone|value|EmailAddress|value|Message|value|Contact_Type_ID_FC|value|Contact_Best_Way_ID|value|Best_Contact_Time|value" TM_columnsStr = "FirstName|',none,''|LastName|',none,''|Address1|',none,''|Address2|',none,''|City|',none,''|State|',none,''|Zip|',none,''|Phone|',none,''|Moblie_Phone|',none,''|EmailAddress|',none,''|Message|',none,''|Contact_Type_ID_FC|none,none,NULL|Contact_Best_Way_ID|none,none,NULL|Best_Contact_Time|',none,''" ' create the TM_fields and TM_columns arrays TM_fields = Split(TM_fieldsStr, "|") TM_columns = Split(TM_columnsStr, "|") ' set the form values For TM_i = LBound(TM_fields) To UBound(TM_fields) Step 2 TM_fields(TM_i+1) = CStr(Request.Form(TM_fields(TM_i))) Next ' append the query string to the redirect URL If (TM_editRedirectUrl <> "" And Request.QueryString <> "") Then If (InStr(1, TM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then TM_editRedirectUrl = TM_editRedirectUrl & "?" & Request.QueryString Else TM_editRedirectUrl = TM_editRedirectUrl & "&" & Request.QueryString End If End If End If %> <% ' *** Insert Record: construct a sql insert statement and execute it Dim TM_tableValues Dim TM_dbValues If (CStr(Request("MM_insert")) <> "") Then ' create the sql insert statement TM_tableValues = "" TM_dbValues = "" For TM_i = LBound(TM_fields) To UBound(TM_fields) Step 2 TM_formVal = TM_fields(TM_i+1) TM_typeArray = Split(TM_columns(TM_i+1),",") TM_delim = TM_typeArray(0) If (TM_delim = "none") Then TM_delim = "" TM_altVal = TM_typeArray(1) If (TM_altVal = "none") Then TM_altVal = "" TM_emptyVal = TM_typeArray(2) If (TM_emptyVal = "none") Then TM_emptyVal = "" If (TM_formVal = "") Then TM_formVal = TM_emptyVal Else If (TM_altVal <> "") Then TM_formVal = TM_altVal ElseIf (TM_delim = "'") Then ' escape quotes TM_formVal = "'" & Replace(TM_formVal,"'","''") & "'" Else TM_formVal = TM_delim + TM_formVal + TM_delim End If End If If (TM_i <> LBound(TM_fields)) Then TM_tableValues = TM_tableValues & "," TM_dbValues = TM_dbValues & "," End If TM_tableValues = TM_tableValues & TM_columns(TM_i) TM_dbValues = TM_dbValues & TM_formVal Next TM_editQuery = "insert into " & TM_editTable & " (" & TM_tableValues & ") values (" & TM_dbValues & ")" If (Not TM_abortEdit) Then ' execute the insert Set TM_editCmd = Server.CreateObject("ADODB.Command") TM_editCmd.ActiveConnection = TM_editConnection TM_editCmd.CommandText = "SET NOCOUNT ON;" & TM_editQuery & ";SELECT myID = @@IDENTITY" Set rs = TM_editCmd.Execute if NOT rs.EOF Then Session("ConID") = rs.Fields.Item("myID").Value end if TM_editCmd.ActiveConnection.Close If (TM_editRedirectUrl <> "") Then Response.Redirect(TM_editRedirectUrl) End If End If End If %> <% Dim Route Dim Route_cmd Dim Route_numRows Set Route_cmd = Server.CreateObject ("ADODB.Command") Route_cmd.ActiveConnection = MM_OSSsql_STRING Route_cmd.CommandText = "SELECT * FROM dbo.Contact_Us_Route" Route_cmd.Prepared = true Set Route = Route_cmd.Execute Route_numRows = 0 %> <% Dim BestWay Dim BestWay_cmd Dim BestWay_numRows Set BestWay_cmd = Server.CreateObject ("ADODB.Command") BestWay_cmd.ActiveConnection = MM_OSSsql_STRING BestWay_cmd.CommandText = "SELECT * FROM dbo.Contact_Us_Center_Best_Way" BestWay_cmd.Prepared = true Set BestWay = BestWay_cmd.Execute BestWay_numRows = 0 %> Contact Ohio Secured Shred
All Ohio Secure Shred

Contact All Ohio Secure Shred

Back To Home - Ohio Shred
Phone (888) 747-3394
 
  How can we Help? Contact us today.
  Please fill the information below and we will respond to your needs shortly.
   
First Name:
Last Name:
Address1:
Address2:
City:
State:
Zip:
Phone:
Mobile Phone:
Email Address:
   
  Your Comments, Questions and Inquiries
please use the space below to give as much detail as possible
 
   
Inquiry Routing:
  To expedite service, please choose the most appropriate department above to answer your question of inquiry. Choosing a department routes your inquiry directly to that area eliminating internal email sorting.
Best Way to
Contact You:
Best Contact Time:
 
 

All Ohio Secure Shred
14250 South Industrial, Maple Heights, Ohio
Phone: (216)332-9850
Toll Free: (888)-747-3394

   
©2006 All Ohio Secure Shred  -  All Rights Reserved  
 
Our Services Company Information Solutions Contact Us <% Route.Close() Set Route = Nothing %> <% BestWay.Close() Set BestWay = Nothing %>