% Set DBConn = Server.CreateObject("ADODB.Connection") Set Rs = Server.Createobject("ADODB.Recordset") Set ItemRs = Server.Createobject("ADODB.Recordset") Set TotalCountRs = Server.Createobject("ADODB.Recordset") DBConn.Open Session("DSN") v_ProductID = Request("product_id") v_Brand = Request("brand_id") v_State = Request("txtstate") If v_Brand = "" then v_ProductID ="-1" If v_Brand = "" then v_State ="-1" If v_Brand = "" then v_Brand ="-1" if v_ProductID <> "" and v_ProductID <> "-1" then rs.Open "select * from products where product_id = " & v_ProductID,DBConn TotalCountRs.Open "select count(*) from products_colors where product_id = " & v_ProductID,DBConn ItemRs.Open "select * from products_colors where product_id = " & v_ProductID,DBConn v_Brand = rs.Fields("brand_id") v_ProdName = rs.Fields("product_n") v_Desc = rs.Fields("desc") v_Eye = rs.Fields("eye") v_Bridge = rs.Fields("bridge") v_Temple = rs.Fields("temple") v_WholesalePrice = rs.Fields("wholesale_price") v_MyCostPrice = rs.Fields("my_cost_price") v_CounterOfferPrice = rs.Fields("counter_offer_price") v_Price = rs.Fields("price") v_PrimeVendor = rs.Fields("prime_vendor") v_RealID = rs.Fields("real_id") v_Show = rs.Fields("show_I") v_Rimless = rs.Fields("rimless_i") v_Svarovsky = rs.Fields("swarovski_i") v_Gender = rs.Fields("gender_i") v_ColorCounter = TotalCountRs.Fields(0) if v_Show = "True" then v_Show = "checked" if v_Svarovsky = "True" then v_Svarovsky = "checked" if v_Rimless = "True" then v_Rimless = "checked" rs.Close end if %>