<% Response.ContentType = "text/html" Response.AddHeader "Content-Type", "text/html;charset=UTF-8" Response.CodePage = 65001 Response.CharSet = "UTF-8" letter = Request.QueryString("alphalist") Set MyConn = Server.CreateObject("ADODB.Connection") textFilePath = Server.MapPath("resources") MyConn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _ "Dbq=" & textFilePath & ";" & _ "Extensions=asc,csv,tab,txt;" & _ "Persist Security Info=False" 'SQL_query = "SELECT * FROM PublishURLtoFile.txt WHERE (country = 'United States' or country = 'méxico' or country = 'italy' or country = 'canada' or country = 'china' or country = 'japan') and (CompanyName Like '"& letter &"%') ORDER BY CompanyName" SQL_query = "SELECT * FROM PublishURLtoFile.txt WHERE (country <> 'Portugal' and country <> 'España' and createdby = '5' and pjrfsi <> '1') and (CompanyName Like '"& lcase(letter) &"%' or CompanyName Like '"& ucase(letter) &"%')" Set RS = MyConn.Execute(SQL_query) %> <% for x= 65 to 90 response.write "" Next %>
" & chr(x) & "

<% Sub DisplayReferral If rs("URL") <> "" And rs("publishURL") = "Y" Then If rs("LogoURL") <> "" Then Response.Write "" & vbcrlf End If Response.Write "" & rs("CompanyName") & "
" & vbcrlf Else Response.Write "" & rs("CompanyName") & "
" & vbcrlf End If End Sub Do While Not rs.EOF DisplayReferral rs.MoveNext Loop MyConn.close set MyConn = nothing %>