Jump to content
Fórum Script Brasil
  • 0
Sign in to follow this  
marcus Gemeos

Lê Mais De Um Registaro No Banco De Dados

Question

Olá pessoal,

Eu tenho um pequeno sistema que ele realiza contas com os valores que estão cadastrado no banco de dados, mas ele só lê o primeiro registro não lê de segundo em diante por que?

Abraixo segue o código

Precisso!

Obrigado!

Marcus

----------------------------------------------------------------------------------------------

<%

IF rs.EOF then

Response.write "<i>Não existem débitos pendentes...</i>"

ELSE

rs.MoveFirst

While not rs.EOF

%>

<tr>

<td width="9%">&nbsp;</td>

<td width="66%" bgcolor="#F8F8F8">

<p align="left"><font size="2" face="Verdana"><%=rs("Produto")%></font></td>

<td width="14%" bgcolor="#F8F8F8">

<p align="left"><font face="Verdana" size="2">R$ <%=rs("Valor")%></font></td>

<td width="11%">&nbsp;</td>

</tr>

<%

VarValor = rs("Debitos")

VarValorPorcentagem = 5

VarComissao = VarValor * VarValorPorcentagem / 100

VarTotal = VarComissao + VarValor

rs.movenext

Wend

end if

rs.Close

%>

</table>

</td>

</tr>

<tr>

<td width="100%">

<table border="0" cellpadding="0" cellspacing="3" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber32">

<tr>

<td width="25%">&nbsp;</td>

<td width="39%">&nbsp;</td>

<td width="11%" bgcolor="#DFDFDF">

<p align="right"><b><font face="Verdana" size="2">Comissão:</font></b></td>

<td width="25%">

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber34">

<tr>

<td width="54%" bgcolor="#F8F8F8">

<p align="left"><font face="Verdana" size="2">R$ <%=VarComissao%></font></td>

<td width="46%">

<p align="left">&nbsp;</td>

</tr>

</table>

</td>

</tr>

<tr>

...

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  



  • Forum Statistics

    • Total Topics
      148576
    • Total Posts
      644276
×
×
  • Create New...