Sign in to follow this  
shelter

Erro

Recommended Posts

Boa galera ,

aqui estou execultando este codigo e estou com o seguinte erro:

<%
Option Explicit
%> 
<!--#Include file="conexao5.inc"-->
<%
DIM conexaodb, CRJJ04 , rsRJJ0602 , rsRJJ06021 , rsDDD , strSQL , strSQL2 , total , total_tempo , rsDDD3
Dim iCount
Dim sRowColor
Dim Geral , rsGeral , percentual2 , strSQL3 , rsGeral2 , valor_conta , minutos , valor_pagar , valor_segundo , total5
valor_segundo = 1
valor_conta = 10000
'valor_pagar = total5 * 1.55
Call abreConexao
strSQL = " SELECT Ramal.grupo , SUM (CRJJ04.duracao) AS total2 , COUNT (Ramal.grupo) AS total , AVG (CRJJ04.duracao) AS total3 , SUM (CRJJ04.duracao) AS total5 "
strSQL = strSQL & " FROM Ramal, CRJJ04 "
strSQL = strSQL & " where CRJJ04.origem=Ramal.Ramal "
strSQL = strSQL & " And tipo = 1 "
strSQL = strSQL & " And servico = 8 "
strSQL = strSQL & " And n_discado = '2300' "
strSQL = strSQL & " GROUP BY Ramal.grupo  "
set rsDDD = conexaodb.execute(strSQL)

strSQL3 = " SELECT  SUM ( duracao ) AS total_tempo "
strSQL3 = strSQL3 & " FROM CRJJ04 "
strSQL3 = strSQL3 & " WHERE servico = 8 "
strSQL3 = strSQL3 & " And tipo = 1 "
strSQL3 = strSQL3 & " And n_discado = '2300' "
Set rsGeral2 = conexaodb.Execute(strSQL3)


strSQL2 = " SELECT  COUNT ( n_discado ) AS geral "
strSQL2 = strSQL2 & " FROM CRJJ04 "
strSQL2 = strSQL2 & " WHERE servico = 8 "
strSQL2 = strSQL2 & " And tipo = 1 "
strSQL2 = strSQL2 & " And n_discado = '2300' "

Set rsGeral = conexaodb.Execute(strSQL2)


%>

<html>
<head>
<title>Sum&aacute;rio 0800</title>
<link href="meu.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style18 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
a:visited {
    color: #000000;
    text-decoration: none;
}
.style21 {font-size: 10px}
a:link {
    color: #000000;
    text-decoration: none;
}
.style22 {color: #006699}
a:hover {
    text-decoration: none;
}
a:active {
    text-decoration: none;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#FFFFFF">
<p class="style18 style22"><font face="arial"><b>Sum&aacute;rio 0800 por carteira:</font></p>
<table width="500"  border="0">
  <tr class="style18">
    <td width="69" class="style21">Per&iacute;odo de: </td>
    <td width="353"><span class="style21">19/03 &agrave; 19/04/2007.</span></td>
    <td width="29">&nbsp;</td>
    <td width="31">&nbsp;</td>
  </tr>
</table>
<table width="500" border="0">
  <tr>
    <td width="113"><div align="right"><span class="style18">Total  R$: </span></div></td>
    <td width="88" div align="right" class="style18"><% response.Write FormatNumber ( valor_conta ) %>    
      <div align="right"></div>
    <td width="118">&nbsp;</td>
    <td width="66"><div align="center"><span class="style21"><a href="Centro_Index.asp">Voltar</a></span></div></td>
    <td width="93"><div align="center"><u><span class="style18"> <a href="java script:Self:print()">&lt; Imprimir &gt; </a> </span></u></div></td>
  </tr>
  <tr class="style18">
    <td><div align="left">Total de liga&ccedil;&otilde;es:</div></td>
    <td><div align="left"><% response.Write FormatNumber( rsGeral( "geral" ),0) %> </div></td>
    <td></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<p><font color="red" size="3" face="arial"></font></p>
<table width="800" border="0">
  <tr bgcolor="#006699">
    <td width="118"><div align="center"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Carteira:</font></div></td>
    <td width="87"><div align="center"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Quantidade:</font></div></td>
    <td width="91"><div align="center"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Total tempo:</font></div></td>
    <td width="175"><div align="left"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Tempo m&eacute;dio por liga&ccedil;&atilde;o:</font></div></td>
    <td width="101"><div align="center"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Total &agrave; pagar:</font></div></td>
    <td width="202" bgcolor="#006699"><div align="center"></div></td>
  </tr>
</table>
<table border='0' cellpadding='0' cellspacing='2' width='800'>
<%
Do While Not rsDDD.Eof
iCount = iCount + 1
    If iCount Mod 2 = 0 Then
        sRowColor = "#DDF4FF"
    Else
        sRowColor = "#FFFFFF"
    End If
%>
 <tr bgcolor="<%= sRowColor %>">
   <td width="118"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
     <% = rsDDD.fields( "Grupo" ) %>
   </font></td>
   <td width="89"><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
       <% response.Write FormatNumber( rsDDD( "total" ),0) %>
   </font></div></td>

   <td width="92">
      <div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
                  
        <% minutos = dateadd("s", rsDDD.Fields("total2"), "00:00:00")
response.write formatdatetime(minutos,3) %>
          
    </font></div></td><td width="179"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
        <% minutos = dateadd("s", rsDDD.Fields("total3"), "00:00:00")
response.write formatdatetime(minutos,3) %>
      </font></div></td>
<td width="103">
      <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<% valor_pagar=rsDDD("total5") * ("valor_segundo") %>
<% Response.write (valor_pagar) %>


      
      </font></div></td><td width="205"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
       
</font> </div></td>

</Tr>
<%
rsDDD.MoveNext
'rsDDD3.MoveNext

Loop
rsDDD.close
'rsDDD3.close
'rsGeral.close

call fechaconexao

Set rsDDD = Nothing
'Set rsDDD3 = Nothing
'Set rsGeral = Nothing
%>
</table>
<p>&nbsp;</p>
</body>
</html>

ERRO:

Informações técnicas (para a equipe de suporte)

Tipo de erro:

Erro de tempo de execução do Microsoft VBScript (0x800A000D)

Tipos incompatíveis: '[string: "valor_segundo"]'

/atn2/0800.asp, line 136

Tipo de navegador:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; InfoPath.1)

Página:

GET /atn2/0800.asp

Hora:

domingo, 6 de maio de 2007, 12:33:15

Mais informações:

Suporte da Microsoft

Agradeço o apoio dos amigos...

A maior sabedoria de um homem , é saber compartilhar....

Abraços

Valmir Lopes

Share this post


Link to post
Share on other sites

o que é esse valorsegundo entre parentesis sem nd??

<% valor_pagar=rsDDD("total5") * ("valor_segundo") %>

não era pra pegar de um recorset ou de um request??

Share this post


Link to post
Share on other sites

Este valor é uma varial com o valor fixo.

<%

Option Explicit

%>

<!--#Include file="conexao5.inc"-->

<%

DIM conexaodb, CRJJ04 , rsRJJ0602 , rsRJJ06021 , rsDDD , strSQL , strSQL2 , total , total_tempo , rsDDD3

Dim iCount

Dim sRowColor

Dim Geral , rsGeral , percentual2 , strSQL3 , rsGeral2 , valor_conta , minutos , valor_pagar , valor_segundo , total5

valor_segundo = 1

valor_conta = 10000

valor_pagar = total5 * 1.55

é que este valor ... é o valor que tenho pelo segundo falado...

Agradeço ....

abraços

me ajuda aí....

Valmir Lopes

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   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