Jump to content
Fórum Script Brasil
  • 0

(0x80020009)


smez
 Share

Question

Tipo de erro:

(0x80020009)

Exceção.

/wd5/wmskyel/site/admin/hehe.asp, line 39

Tipo de navegador:

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

<%
' ======================================================================
' Author:  Sérgio Cacique
' Create date:  21/08/2007
' Description: Bônus Incentivo 1ª 15 dias, 4 indicações (1ªgeração)
' =======================================================================

txtCdUsuario = Request.Form("txtCdUsuario")

 '----------------------------------------
 ' Gera Senha Aleatoria
 '----------------------------------------
 Const szDefault = "abcdefghijklmnopqrstuvwxyz0123456789"
 Randomize

 sValidChars = szDefault
 nLenght = Len(sValidChars)

 For nCount =1 to 6
 nNumber = Int((nLenght * Rnd) + 1)

 sRet = sRet & Mid(SvalidChars, nNumber,1)
 Next

Set rs = CreateObject("ADODB.Recordset")
Set rs.activeconnection = abredb

SQL = "SELECT COUNT(*) AS TOTAL FROM Amigo WHERE CdUsuario="&txtCdUsuario&""
rs.open sql

If rs("TOTAL") = "4" Then

while not rs.eof
rs.movenext
wend

 Response.Write("SALVA BONUS")
 If rs("TOTAL") =< 3 Then LINHA DO ERRO
  Response.Write("SALVA CADASTRO")
 else
  Response.Write("SUA REDE NÃO ESTA COMPLETA")
 END IF
else
 If rs("TOTAL") =< 3 Then
  Response.Write("SALVA CADASTRO")
 else
  Response.Write("SUA REDE NÃO ESTA COMPLETA")
 END IF

end if
%>

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Quando se faz um Count ou Sum sem Group By não é necessário percorrer o RecordSet, pois o mesmo retornará apenas uma linha.

Em relação ao erro, acredito que se alterar esta linha:

If rs("TOTAL") =< 3 Then
Para isso:
If Clng(rs("TOTAL")) <= 3 Then

Deve resolver.

Link to comment
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
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.

 Share



  • Forum Statistics

    • Total Topics
      150.1k
    • Total Posts
      647.1k
×
×
  • Create New...