Ir para conteúdo

POWERED BY:

Arquivado

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

williamot

[Resolvido] O q há de errado

Recommended Posts

Gente.. eu tô tentando fazer uma enquete no dreamweaver só q tem um porem..

Tô usandoo dreamweaver cs3 .. o disply counter record eles modificaram.. ai tem um dinamic text q é igual porém não sei se é o msm q dizem no tutorial..

 

mas o pior não é isso..

 

quando ele roda a página de resultado ele exibe um erro

 

"

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

 

  • Tipo de erro:

    Provider (0x80004005)

    Erro não especificado

    /grupo aclamasamba/site/new/resultado.asp, line 37

  • Tipo de navegador:

    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 2.0.50727)

  • Página:

    GET /grupo aclamasamba/site/new/resultado.asp "

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/bdaclamasamba.asp" -->
<%
Dim perg1__MMColParam
perg1__MMColParam = "0"
If (Request("MM_EmptyValue") <> "") Then 
  perg1__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim perg1
Dim perg1_cmd
Dim perg1_numRows

Set perg1_cmd = Server.CreateObject ("ADODB.Command")
perg1_cmd.ActiveConnection = MM_bdaclamasamba_STRING
perg1_cmd.CommandText = "SELECT * FROM enquete WHERE voto = ?" 
perg1_cmd.Prepared = true
perg1_cmd.Parameters.Append perg1_cmd.CreateParameter("param1", 5, 1, -1, perg1__MMColParam) ' adDouble

Set perg1 = perg1_cmd.Execute
perg1_numRows = 0
%>
<%
Dim perg2__MMColParam
perg2__MMColParam = "1"
If (Request("MM_EmptyValue") <> "") Then 
  perg2__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim perg2
Dim perg2_cmd
Dim perg2_numRows

Set perg2_cmd = Server.CreateObject ("ADODB.Command")
perg2_cmd.ActiveConnection = MM_bdaclamasamba_STRING
perg2_cmd.CommandText = "SELECT * FROM enquete WHERE voto = ?" 
perg2_cmd.Prepared = true
perg2_cmd.Parameters.Append perg2_cmd.CreateParameter("param1", 5, 1, -1, perg2__MMColParam) ' adDouble

Set perg2 = perg2_cmd.Execute
perg2_numRows = 0
%>
<%
Dim per3__MMColParam
per3__MMColParam = "2"
If (Request("MM_EmptyValue") <> "") Then 
  per3__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim per3
Dim per3_cmd
Dim per3_numRows

Set per3_cmd = Server.CreateObject ("ADODB.Command")
per3_cmd.ActiveConnection = MM_bdaclamasamba_STRING
per3_cmd.CommandText = "SELECT * FROM enquete WHERE voto = ?" 
per3_cmd.Prepared = true
per3_cmd.Parameters.Append per3_cmd.CreateParameter("param1", 5, 1, -1, per3__MMColParam) ' adDouble

Set per3 = per3_cmd.Execute
per3_numRows = 0
%>
<%
Dim total
Dim total_cmd
Dim total_numRows

Set total_cmd = Server.CreateObject ("ADODB.Command")
total_cmd.ActiveConnection = MM_bdaclamasamba_STRING
total_cmd.CommandText = "SELECT * FROM enquete" 
total_cmd.Prepared = true

Set total = total_cmd.Execute
total_numRows = 0
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim per3_total
Dim per3_first
Dim per3_last

' set the record count
per3_total = per3.RecordCount

' set the number of rows displayed on this page
If (per3_numRows < 0) Then
  per3_numRows = per3_total
Elseif (per3_numRows = 0) Then
  per3_numRows = 1
End If

' set the first and last displayed record
per3_first = 1
per3_last  = per3_first + per3_numRows - 1

' if we have the correct record count, check the other stats
If (per3_total <> -1) Then
  If (per3_first > per3_total) Then
	per3_first = per3_total
  End If
  If (per3_last > per3_total) Then
	per3_last = per3_total
  End If
  If (per3_numRows > per3_total) Then
	per3_numRows = per3_total
  End If
End If
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim total_total
Dim total_first
Dim total_last

' set the record count
total_total = total.RecordCount

' set the number of rows displayed on this page
If (total_numRows < 0) Then
  total_numRows = total_total
Elseif (total_numRows = 0) Then
  total_numRows = 1
End If

' set the first and last displayed record
total_first = 1
total_last  = total_first + total_numRows - 1

' if we have the correct record count, check the other stats
If (total_total <> -1) Then
  If (total_first > total_total) Then
	total_first = total_total
  End If
  If (total_last > total_total) Then
	total_last = total_total
  End If
  If (total_numRows > total_total) Then
	total_numRows = total_total
  End If
End If
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim perg2_total
Dim perg2_first
Dim perg2_last

' set the record count
perg2_total = perg2.RecordCount

' set the number of rows displayed on this page
If (perg2_numRows < 0) Then
  perg2_numRows = perg2_total
Elseif (perg2_numRows = 0) Then
  perg2_numRows = 1
End If

' set the first and last displayed record
perg2_first = 1
perg2_last  = perg2_first + perg2_numRows - 1

' if we have the correct record count, check the other stats
If (perg2_total <> -1) Then
  If (perg2_first > perg2_total) Then
	perg2_first = perg2_total
  End If
  If (perg2_last > perg2_total) Then
	perg2_last = perg2_total
  End If
  If (perg2_numRows > perg2_total) Then
	perg2_numRows = perg2_total
  End If
End If
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim perg1_total
Dim perg1_first
Dim perg1_last

' set the record count
perg1_total = perg1.RecordCount

' set the number of rows displayed on this page
If (perg1_numRows < 0) Then
  perg1_numRows = perg1_total
Elseif (perg1_numRows = 0) Then
  perg1_numRows = 1
End If

' set the first and last displayed record
perg1_first = 1
perg1_last  = perg1_first + perg1_numRows - 1

' if we have the correct record count, check the other stats
If (perg1_total <> -1) Then
  If (perg1_first > perg1_total) Then
	perg1_first = perg1_total
  End If
  If (perg1_last > perg1_total) Then
	perg1_last = perg1_total
  End If
  If (perg1_numRows > perg1_total) Then
	perg1_numRows = perg1_total
  End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (per3_total = -1) Then

  ' count the total records by iterating through the recordset
  per3_total=0
  While (Not per3.EOF)
	per3_total = per3_total + 1
	per3.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (per3.CursorType > 0) Then
	per3.MoveFirst
  Else
	per3.Requery
  End If

  ' set the number of rows displayed on this page
  If (per3_numRows < 0 Or per3_numRows > per3_total) Then
	per3_numRows = per3_total
  End If

  ' set the first and last displayed record
  per3_first = 1
  per3_last = per3_first + per3_numRows - 1
  
  If (per3_first > per3_total) Then
	per3_first = per3_total
  End If
  If (per3_last > per3_total) Then
	per3_last = per3_total
  End If

End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (total_total = -1) Then

  ' count the total records by iterating through the recordset
  total_total=0
  While (Not total.EOF)
	total_total = total_total + 1
	total.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (total.CursorType > 0) Then
	total.MoveFirst
  Else
	total.Requery
  End If

  ' set the number of rows displayed on this page
  If (total_numRows < 0 Or total_numRows > total_total) Then
	total_numRows = total_total
  End If

  ' set the first and last displayed record
  total_first = 1
  total_last = total_first + total_numRows - 1
  
  If (total_first > total_total) Then
	total_first = total_total
  End If
  If (total_last > total_total) Then
	total_last = total_total
  End If

End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (perg2_total = -1) Then

  ' count the total records by iterating through the recordset
  perg2_total=0
  While (Not perg2.EOF)
	perg2_total = perg2_total + 1
	perg2.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (perg2.CursorType > 0) Then
	perg2.MoveFirst
  Else
	perg2.Requery
  End If

  ' set the number of rows displayed on this page
  If (perg2_numRows < 0 Or perg2_numRows > perg2_total) Then
	perg2_numRows = perg2_total
  End If

  ' set the first and last displayed record
  perg2_first = 1
  perg2_last = perg2_first + perg2_numRows - 1
  
  If (perg2_first > perg2_total) Then
	perg2_first = perg2_total
  End If
  If (perg2_last > perg2_total) Then
	perg2_last = perg2_total
  End If

End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (perg1_total = -1) Then

  ' count the total records by iterating through the recordset
  perg1_total=0
  While (Not perg1.EOF)
	perg1_total = perg1_total + 1
	perg1.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (perg1.CursorType > 0) Then
	perg1.MoveFirst
  Else
	perg1.Requery
  End If

  ' set the number of rows displayed on this page
  If (perg1_numRows < 0 Or perg1_numRows > perg1_total) Then
	perg1_numRows = perg1_total
  End If

  ' set the first and last displayed record
  perg1_first = 1
  perg1_last = perg1_first + perg1_numRows - 1
  
  If (perg1_first > perg1_total) Then
	perg1_first = perg1_total
  End If
  If (perg1_last > perg1_total) Then
	perg1_last = perg1_total
  End If

End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
@import url("../css-aclama.css");
body {
	background-color: #EDE6D4;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
</head>

<body>
<table width="292" height="96" border="0" cellpadding="0" cellspacing="0" class="txt-enquete">
  <tr>
	<td height="20" colspan="2">O que você achou do CD do  Grupo 
	Aclamasamba ?</td>
  </tr>
  <tr>
	<td colspan="2" valign="top"> </td>
  </tr>
  <tr>
	<td width="107">Melhor Impossivel :</td>
	<td width="162"><%=(perg1_total)%></td>
  </tr>
  <tr>
	<td>Muito Bom :</td>
	<td><%=(perg2_total)%></td>
  </tr>
  <tr>
	<td>Regular :</td>
	<td><%=(per3_total)%></td>
  </tr>
  <tr>
	<td>Total :</td>
	<td><%=(total_total)%></td>
  </tr>
</table>
</body>
</html>
<%
perg1.Close()
Set perg1 = Nothing
%>
<%
perg2.Close()
Set perg2 = Nothing
%>
<%
per3.Close()
Set per3 = Nothing
%>
<%
total.Close()
Set total = Nothing
%>

o q tem de errado nessa birosca.. detalhe.. quando votamos na enquete ele já grava os valores .. são 3 respostas..

pergunta1 - valor0

pergunta2 - valor1

pergunta3 - valor2

 

só q nun funfa para exibir o resultado.. :blink:

to ficando loko já com isso.. rs

 

valeu

Compartilhar este post


Link para o post
Compartilhar em outros sites

Por favor.... indique QUAL é a linha 37.. que contem o erro.....

 

 

Abraços...

Compartilhar este post


Link para o post
Compartilhar em outros sites

Valeu gente pela ajuda.. mas acabei deixando essa enquete de lado e fiz uma outra via txt.. ai reslveu o problema..

 

valeu pela ajuda.. :)

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.