<% set Conn = Server.CreateObject("ADODB.Connection") Conn.open CDSN query = "SELECT idIndicadorProfissional, nome, atividade, ddd, telefone, email FROM IndicadorProfissional ORDER BY nome" set RS = Conn.execute (query) %> Perfeita União
<% if RS.EOF then Response.write("

Não há Indicador Profissional disponível.

") else while (not RS.EOF) %> <% ddd = PegaDoBD(RS("ddd")) if (len(ddd)>0) then ddd = "(" & ddd & ")" telefone = PegaDoBD(RS("telefone")) if (len(telefone)>4) then telefone = left(telefone, len(telefone)-4) & "-" & right(telefone, 4) %>
<% nomeDoArquivo = "indicador" & PegaDoBD(RS("idIndicadorProfissional")) MostraFoto nomeDoArquivo, "foto" %>
Nome:

<%= PegaDoBD(RS("nome")) %>

Atividade:

<%= PegaDoBD(RS("atividade")) %>

Telefone:

<% Response.write(ddd & " " & telefone) %>

E-mail:

"><%= PegaDoBD(RS("email")) %>

<% RS.MoveNext if not RS.EOF then %>

<% end if wEnd end if %>
<% set RS = nothing Conn.close set Conn = nothing %>