<%
wLogin=request.item("Login")
wSenha=request.item("Senha")
wEmpresa=request.item("Empresa")
wLetra=request.item("Letra") & "%"
Set Conexao = Server.CreateObject("ADODB.Connection")
Conexao.Open session("stringconexaobomdesorte")
Sql = "SELECT Count(*) as Total FROM TICKETS WHERE CD_EMPRESA = " & wEMPRESA & ""
Set rstempTotal = Conexao.Execute ( Sql )
Sql = "SELECT DISTINCT (C.NOME), C.Cliente, E.NOME AS EMPRESA FROM CLIENTES C LEFT JOIN TICKETS T ON (T.CD_CLIENTE = C.CLIENTE) LEFT JOIN EMPRESAS E ON (E.EMPRESA = T.CD_EMPRESA) LEFT JOIN PLANOS P ON (P.PLANO = T.PLANO) WHERE E.EMPRESA = " & wEMPRESA & " and E.Login = '" & wLogin & "' and E.Senha = '" & wSenha & "' AND C.NOME Like '" & wLetra & "' order by C.NOME"
Set rstemp = Conexao.Execute ( Sql )
%>
<% If rstemp.eof then%>
Não
existe Nomes iniciados com essa letra.