Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

RELUVIARI

erro no select

Recommended Posts

caras nao sei o que acontece ...minha consulta tem um campo no qual ele pode ser preenchido ou nao se ele estiver preenchido ele aparece normal mais se ele estiver vazio(este campo é opcional depende do cliente para ser preenchido )se ele estiver vazio da erro en eu fiz esse codigo aki<%if rsquery4("nome")<>"" then%><%=rsquery4("nome")%><%end if%>só q dá ese erro...na linha onde está esse codigo acima Tipo de erro:(0x80020009)Exceção. como eu faço para nao dar mais esse erroo codigo inteiro é esse...<%set rsquery = conn.execute("select DataNascimento1 = CONVERT(nvarchar(20), DataNascimento, 103),ValidadeCnh1=CONVERT(nvarchar(20), ValidadeCnh, 103),DataInclusao1=CONVERT(nvarchar(20), DataInclusao, 103),DataAlteracao1=CONVERT(nvarchar(20), DataAlteracao, 103), * From Clientes Where CnpjCpf = '"&Session("logado")&"' ")set rsquery2 =conn.execute ("select * From estadocivil Where estadocivil = ' "& rsquery("estadocivil") &" '")set rsquery3 = conn.execute ("select * From corretorasucur Where sucursal = ' "& rsquery("filial") &" '")set rsquery4 = conn.execute ("select * From bancos Where banco = ' "& rsquery("banco") &" '")Session("Cliente") = rsquery("Cliente")%><html><head><title>:::Classificação:::</title></head><body><div id="Layer2" style="position:absolute; left:192px; top:277px; width:745px; height:258px; z-index:2"> <fieldset style="width: 800; height: 80%; padding: 10"> <legend> <b><font color="#000080" size="3" face="Arial">DADOS GERAIS</font> </b> </legend> <br> <table border="2"ID="Table1" width="40%"> <tr> <td width="100" bgcolor="#ffffe1"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>CLIENTE</b></font></td> <td align="left" bgcolor="#ffffe1" width="118"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>PRIMEIRO SEGURO</b></font></td> </tr> <tr> <td width="100"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("cliente")%></b></font> </td> <td width="100"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("PrimeiroSeguro")%></b></font> </td> </tr></table><BR><table border="2"ID="Table1" width="90%" height="39"> <tr> <td align="left" bgcolor="#ffffe1" height="8" width="412"><font color="#000000"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1">NOME</font></b></font></td> <td align="left" bgcolor="#ffffe1" width="258" height="8"><font color="#000000"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1">NOME PREFERENCIAL</font></b></font></td> </tr> <tr> <td width="412" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("Nome")%></b></font></td> <td width="258" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("NomePreferencial")%></b></font> </td> </tr></table> <BR> <table width="90%" height="116" border="1"ID="Table1"> <tr> <td width="50%" height="108"> <fieldset> <legend><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>TIPO DE PESSOA</b></font></legend> <input type=radio <%if rsquery("TipoPessoa") = "F" then%> checked <%end If%>> <font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>FÍSICA</b></font> <input type=radio <%if rsquery("TipoPessoa") = "J" then%> checked <%end If%>> <font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>JURÍDICA</b></font> </fieldset><br> <fieldset> <legend><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>SEXO</b></font></legend> <input type=radio <%if rsquery("Sexo") = "M" then%> checked <%end If%>> <font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>MASCULINO</b></font> <input type=radio <%if rsquery("Sexo") = "F" then%> checked <%end If%>> <font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>FEMININO</b></font> </fieldset> </td> <td width="50%" height="108"> <table width="100%" border="1" > <tr> <td width="50%" height="8" align="left" bgcolor="#ffffe1" ><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>CNPJ/CPF</b></font></td> <td width="50%" height="8" align="left" bgcolor="#ffffe1" ><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>RG</b></font></td> </tr> <tr> <td width="50%" height="20"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("CnpjCpf")%></b></font> <td width="50%" height="20"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("Rg")%></b></font> </tr> <tr> <td width="50%" height="8" align="left" bgcolor="#ffffe1" ><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>DATA DE NASCIMENTO</b></font></td> <td width="50%" height="8" align="left" bgcolor="#ffffe1" ><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>ESTADO CIVIL</b></font></td> </tr> <tr> <td width="50%" height="20"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("DataNascimento1")%></b></font> <td width="50%" height="20"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%'=rsquery2("descricao")%></b></font> </tr> </table></TD> </tr></table><br><table border="2"ID="Table1" width="90%" height="39"> <tr> <td align="left" bgcolor="#ffffe1" height="8" width="171"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>ESTIPULANTE</b></font></td> <td align="left" bgcolor="#ffffe1" width="171" height="8"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>CONJUGE</b></font></td> </tr> <tr> <td width="165" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("estipulante")%></b></font> </td> <td width="171" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("conjuge")%></b></font> </td> </tr></table><br><table border="2"ID="Table1" width="90%" height="39"> <tr> <td align="left" bgcolor="#ffffe1" height="8" width="171"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>BANCO</b></font></td> <td align="left" bgcolor="#ffffe1" width="171" height="8"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>AGÊNCIA</b></font></td> <td align="left" bgcolor="#ffffe1" height="8" width="171"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>CONTA</b></font></td> <td align="left" bgcolor="#ffffe1" width="171" height="8"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>NÚMERO DA CNH</b></font></td> </tr> <tr> <td width="165" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%if rsquery4("nome")<>"" then%><%=rsquery4("nome")%><%end if%></b></font> </td> <td width="171" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("agencia")%></b></font> </td> <td width="165" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("conta")%></b></font> </td> <td width="171" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("NumeroCnh")%></b></font> </td> </tr></table><br><table border="2"ID="Table1" width="90%" height="39"> <tr> <td align="left" bgcolor="#ffffe1" height="8" width="171"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>VALIDADE DA CNH</b></font></td> <td align="left" bgcolor="#ffffe1" width="171" height="8"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>E-MAIL</b></font></td> <td align="left" bgcolor="#ffffe1" height="8" width="171"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>FILIAL</b></font></td> </tr> <tr> <td width="165" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("ValidadeCnh1")%></b></font></td> <td width="165" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("email")%></b></font></td> <td width="171" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery3("nome")%></b></font> </td> </tr></table><br><table border="2"ID="Table1" width="90%" height="39"> <tr> <td align="left" bgcolor="#ffffe1" height="8" width="171"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>HOME PAGE</b></font></td> <td align="left" bgcolor="#ffffe1" width="171" height="8"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>DATA INCLUSÃO</b></font></td> <td align="left" bgcolor="#ffffe1" height="8" width="171"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>DATA ALTERAÇÃO</b></font></td> </tr> <tr> <td width="165" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("HomePage")%></b></font> </td> <td width="171" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("DataInclusao1")%></b></font> </td> <td width="165" height="19"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%=rsquery("DataAlteracao1")%></b></font> </td> </tr></table></fieldset></div></body></html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.