<%
letter = Request.QueryString("alphalist")
Set MyConn = Server.CreateObject("ADODB.Connection")
textFilePath = "c:/inetpub/wwwroot/pjr/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 = 'M�xico') and (CompanyName Like '"& letter &"%') ORDER BY CompanyName"
Set RS = MyConn.Execute(SQL_query)
%>
<%
Sub DisplayReferral
If rs("URL") <> "" And rs("publishURL") = "Y" Then
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
%>