<% 'Last Modified:Nov-19-2002 'Developed by Antonio Beckles. option explicit Dim myConn 'Connection to Database Dim myRs 'Recordset Dim myRs2 'Recordset Dim strSQL 'SQL Query String Dim strSQLproducts 'SQL Query String %> Package Details <% ' Create and open ADO connection Set myConn = Server.CreateObject("ADODB.Connection") myConn.Open "NativeTreasures" ' Create SQL Query to get package info strSQL = "SELECT * FROM Packages WHERE package_id = " & Request.QueryString("package_id") ' Create and open ADO recordset Set myRs = Server.CreateObject("ADODB.Recordset") myRs.CursorLocation = 3 ' adUseClient myRs.Open strSQL, myConn ' Create SQL Query to get related package products strSQLProducts = "SELECT * FROM Packages, package_product, Products WHERE Packages.package_id = " & Request.QueryString("package_id") & "AND Packages.package_id = package_product.package_id AND package_product.product_code = Products.product_code" ' Create and open ADO recordset Set myRs2 = Server.CreateObject("ADODB.Recordset") myRs2.CursorLocation = 3 ' adUseClient myRs2.Open strSQLproducts, myConn If myRs.EOF Then Response.Write "

There are no Records in This Table

" Else %>
 

<%Response.Write myRs.Fields("package_name")%>

Description

<%Response.Write myRs.Fields("package_description")%>

US <%Response.Write FormatCurrency(myRs.Fields("package_price"))%>

" target="_blank">Add to cart

<% If myRs2.EOF Then Response.Write "

There are no related Products.

" Else Response.Write "Package Products:
Mouse-over each product name to see a picture

" Do While (Not myRs2.EOF) %> " onmouseover = "doButtons(<%Response.Write "'" & myRs2.Fields("product_image_sml") & "'"%>)" onmouseout = "doButtons(<%Response.Write "'images/blank.gif'"%>)" title="Click for more details"><%Response.Write myRs2.Fields("product_name")%>
<% myRs2.MoveNext Loop ' Close Recordset2 myRs2.Close Set myRs2 = Nothing %> <% End If %>

   ">Back to Product Details

Copyright 2002 Native Treasures Inc.

<% End If %> <% ' Close Recordset myRs.Close Set myRs = Nothing ' Close Connection to Database myConn.Close Set myConn = Nothing %>