• 0
Sign in to follow this  
mharcelinho

Soma Dando Errado.

Question

5 answers to this question

Recommended Posts

  • 0

Coloque o cod inteiro para que possamos olhar!!!!!!!!!!!!!!!

Share this post


Link to post
Share on other sites
  • 0
Coloque o cod inteiro para que possamos olhar!!!!!!!!!!!!!!!

<!--#include file="./Idioma/Portugues.asp"-->

<%

Response.Expires = -1

Response.Expiresabsolute = now - 1

Response.CacheControl = "Private"

Response.Buffer = True

%>

<html><head>

</head>

<body bgcolor="#ffc866">

<%

Dim stString

Dim login

Dim senha

Dim cdcliente

Dim stURL

Dim nmLogin

Dim cdCons

emp = Request("cbbInst")

login = Request("txtLogin")

senha = Request("txtSenha")

CliArray = Split(emp, "@", -1, 1)

cdClie = CliArray(0)

Session("cdFili") = CliArray(1)

set obj = Server.CreateObject("SNT.rdmSnackTech")

stString = obj.ValidaConexao(senha, login, cdClie)

If (stString <> "LogInv") then

dim XMLString

Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")

Set xmlErr = Server.CreateObject("Microsoft.XMLDOM")

set obj = Server.CreateObject("SNT_HTML.rdmSnackTech")

XmlString = obj.GetCdFuncHtm(login, cdClie)

If (mid(XMLString, 1 ,5) = "ERRO_") Then

stErros = mid(XMLString, 6, len(XMLString))

idErro = "S"

%>

<script>

alert('<%=HTMLEncode(stErros)%>')

</script>

<%

Else

xmlDoc.loadXML(XMLString)

xmlDoc.async = False

If xmlDoc.parseError.errorCode <> 0 Then

Response.Write xmlDoc.parseError.reason

End If

Set xmlLst = xmlDoc.getElementsByTagName("ROW")

Dim i

numCad = xmlLst.length

For i = 0 to numCad -1

Aluno = xmlLst.item(i).getAttribute("NMCONSUMIDOR")

Cons = xmlLst.item(i).getAttribute("CDCONSUMIDOR")

Sit = xmlLst.item(i).getAttribute("IDSITCONSUMI")

Mail = xmlLst.item(i).getAttribute("DSEMAILCONS")

Resp = xmlLst.item(i).getAttribute("NMRESPCONS")

Insti = xmlLst.item(i).getAttribute("NMFANTCLIE")

NmTip = xmlLst.item(i).getAttribute("NMTIPOCONS")

CdTip = xmlLst.item(i).getAttribute("CDTIPOCONS")

IdCons = xmlLst.item(i).getAttribute("CDIDCONSUMID")

NrAcesso = xmlLst.item(i).getAttribute("NRACESSOSITE")

Next

End If

set xmlDoc = Nothing

set xmlLst = Nothing

set obj = Nothing

Session("Aluno") = Aluno

Session("Cons") = Cons

Session("Sit") = Sit

Session("Mail") = Mail

Session("Resp") = Resp

Session("Cdcli") = cdClie

Session("Login") = login

Session("Instituicao") = Insti

Session("Cliente") = cdClie

Session("NmTip") = NmTip

Session("CdTip") = CdTip

Session("IdCons") = IdCons

Session("Seta")= "S"

stURL = "menu.asp"

----------------------neste ponto a variável "NrAcesso " traz o numero de acessos e acrescenta mais um--------------------

----------------------so que, por exemplo, se já tiverem 5 acessos ele grava no banco 7 acessos-----------------------------

If NrAcesso <> "" then

set objSoma = Server.CreateObject("SNT.rdmSnackTech")

ResultCont = objSoma.ContAcesso(NrAcesso + 1, Session("Cons"), Session("Cdcli"))

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

%>

<script language="javascript">

location.href = '<%=stURL%>';

</script>

<%

Else

%>

<script language="javascript">

alert('<%=st00131%>')

location.href = 'AltPriSenha.asp';

</script>

<%

End if

Else

IdErro = "S"

stURL = "indice.asp?Erro="&IdErro&"&emp="&emp&"&cdcodcli="&cdClie

%>

<script language="javascript">

location.href = '<%=stURL%>';

</script>

<%

end if

%>

</body>

</html>

Edited by mharcelinho

Share this post


Link to post
Share on other sites
  • 0
no seu codigo nem tem a somatoria, mas tente assim:

valor1 = 1
valor2 = Cint(valor1) +1

ResultCont = objSoma.ContAcesso(NrAcesso + 1, Session("Cons"), Session("Cdcli"))

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
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