<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open Server.MapPath("/") & "\Datacard.mdb" 'Request.Form("lid") formatId = "1" listId = Request.QueryString("lid") formatId = Request.QueryString("fid") if trim(listId) = "182" and formatId <> "4" then if Request.QueryString("fid") is nothing or Trim(Request.QueryString("fid")) = "" then Response.Redirect("Datacard.asp?fid=4&lid=" & listId ) end if Response.Redirect("Datacard.asp?fid=4&lid=" & listId ) elseif trim(listId) <> "182" and formatId = "4" Then Response.Redirect("Datacard.asp?fid=1&lid=" & listId ) end if if Request.QueryString("fid") is nothing or Trim(Request.QueryString("fid")) = "" then Response.Redirect("Datacard.asp?fid=1&lid=" & listId ) end if %>
<% 'listId = Request.QueryString("lid") 'formatId = Request.QueryString("fid") listTitle = "" formatTitle = "" listDescription = "" listSources = "" btb = "" btc = "" set rs = Server.CreateObject("ADODB.recordset") query = "SELECT * FROM [Lists] " & _ " WHERE " & _ " [List_Id] = " & listId rs.Open query, conn strOut = "" do until rs.EOF listTitle = rs.Fields("List_Name") listDescription = rs.Fields("Description") listSources = rs.Fields("Sources") rs.MoveNext loop set rs = Server.CreateObject("ADODB.recordset") query = "SELECT * FROM [Formats] " & _ " WHERE " & _ " [Format_Id] = " & formatId rs.Open query, conn strOut = "" do until rs.EOF formatTitle = rs.Fields("Title") rs.MoveNext loop set rs = Server.CreateObject("ADODB.recordset") query = "SELECT * FROM [BTBAndBTC] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Format_Id] = " & formatId rs.Open query, conn strOut = "" do until rs.EOF btb = rs.Fields("btb") btc = rs.Fields("btc") rs.MoveNext loop fid = formatId 'Request.QueryString("fid") if (fid = 1) then infoclass = "info2" elseif (fid = 2) then infoclass = "info5" elseif (fid = 3) then infoclass = "info3" elseif (fid = 4) then infoclass = "info1" end if %>
<% Response.Write(listTitle) %> <% Response.Write(formatTitle) %>
<% if (Request.QueryString("fid") <> "1") then Response.Write("") Response.Write("") Response.Write("") else Response.Write("") end if %>
postal datacard
<% if (Request.QueryString("fid") <> "2") then Response.Write("") Response.Write("") Response.Write("") else Response.Write("") end if %>
phone datacard
<% if (Request.QueryString("fid") <> "3") then Response.Write("") Response.Write("") Response.Write("") else Response.Write("") end if %>
email datacard
 D a t a b a s e    P r o f i l e
<% Response.Write(listDescription) %>

<% Response.Write(listSources) %>
 U n i v e r s e
BtB <% Response.Write(btb)%> BtC <% Response.Write(btc)%>
<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT * FROM [vwQuantitiesPerRegion] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Format_Id] = " & formatId & _ " AND SortPriority = 15 " & _ " ORDER BY [SortPriority] " rs.Open query, conn strOut = "" do until rs.EOF x=0 wwQuantity = rs.Fields("Quantity") rs.MoveNext loop %>
W O R L D W I D E <% Response.Write(wwQuantity) %>
<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT * FROM [vwQuantitiesPerRegion] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Format_Id] = " & formatId & _ " AND SortPriority < 7 " & _ " ORDER BY [SortPriority] " rs.Open query, conn strOut = "" do until rs.EOF x=0 strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
" & rs.Fields("Region") & "" & rs.Fields("Quantity") & "
  <% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT * FROM [vwQuantitiesPerRegion] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Format_Id] = " & formatId & _ " AND (SortPriority > 6 and SortPriority < 13) " & _ " ORDER BY [SortPriority] " rs.Open query, conn strOut = "" do until rs.EOF x=0 strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
" & rs.Fields("Region") & "" & rs.Fields("Quantity") & "

Geographical Selections
The following counts represent records with at least one of the following: postal address, email address, URL, phone number and fax number.

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "2" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Western Europe
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "6" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Eastern Europe
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "12" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Northern Africa
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "
<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "4" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  North America
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "13" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Central America
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "1" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  South America
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "10" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Caribbean
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "
<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "5" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Far East
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "3" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Oceania
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "11" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Central Asia
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "
<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "9" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Middle East
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "14" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  South Asia
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "

<% set rs = Server.CreateObject("ADODB.recordset") query = "SELECT Quantity, Country FROM [vwQuantitiesAll] " & _ " WHERE " & _ " [List_Id] = " & listId & _ " AND [Region_Id] = " & "8" & _ " AND [Format_Id] = " & formatId & _ " ORDER BY [Country] " rs.Open query, conn strOut = "" do until rs.EOF strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" strOut = strOut & "" rs.MoveNext loop Response.Write(strOut) %>
  Sub-Saharan Africa
" & rs.Fields("Quantity") & "" & rs.Fields("Country") & "