<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "620, 624, 625, 626, 630" strThisBackPage = "products" %> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '=============================================== Dim numErrorNo numErrorNo = 1 If Not Request.Querystring("blnSubmitted") = "True" Then numErrorNo = 1 Else numErrorNo = 0 Dim numParentID, strParentName, strRelations, aryRelations, numCounter numParentID = Request.Querystring("numParentID") strParentName = Request.Querystring("strParentName") strRelations = Request.Querystring("strRelations") '----------------------------------------------- 'DELETE ALL EXISTING RELATION RECORDS '----------------------------------------------- strQuery = strDeleteStatementSyntax & " tblCactuShopRelatedProducts WHERE RP_ParentID = " & numParentID Call ExecuteSQL(strQuery, numCursorType, objRecordSet) '----------------------------------------------- 'CREATE NEW RELATION RECORDS '----------------------------------------------- aryRelations = Split(strRelations, ", ") For numCounter = LBound(aryRelations) To UBound(aryRelations) strQuery = "INSERT INTO tblCactuShopRelatedProducts (RP_ParentID, RP_ChildID) VALUES (" & numParentID & ", " & aryRelations(numCounter) & ")" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) Next End If %> <% WriteString("PageTitle_RelatedProducts") %> <% =strParentName %>
<% If numErrorNo = 0 Then %> <% ElseIf numErrorNo = 1 Then %> <% End If %>
<% WriteString("PageTitle_DefineRelatedProducts") %>
<% =strParentName %>

<% WriteString("ContentText_RelatedProductsUpdated") %> <% =strParentName %>.


<% WriteString("ContentText_CloseWindowLink") %>
<% WriteString("ContentText_ErrorChkRelatedProdIncorrectUse") %>
<% WriteString("ContentText_CloseWindowLink") %>.
<% '----------------------------------------------- 'CLOSE DATA CONNECTIONS '----------------------------------------------- objDataConn.Close Set objDataConn = nothing %>