Ir para conteúdo
Fórum Script Brasil
  • 0

Preciso de uma pequena ajuda


arldin

Pergunta

Boa Tarde a todos, desejo um otimo ano novo.

Amigos e o sequinte, abachei um script de asp para estatistica aqui mesmo no site e estalei,

Mais ao acessar ele, me da o sequinte erro

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x2cf0 Thread 0x1268 DBC 0x1963304 Jet'.

Alquem poderia me ajuda como resolver

Desde já agradeço a todos

Editado por arldin
Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Amigos eu estou com este script de estatisticas mais não estou consequindo fazer com que ele faza a leitura a atualização.

Estes são os escipts

conexao.asp

<%
    way = server.MapPath("estatistica.mdb")
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & way
SET CONN = SERVER.CREATEOBJECT("ADODB.CONNECTION")    
CONN.OPEN strConn

'Response.Write conn.State
'Response.End 

'    1 = aberto
'    0 = fechado
%>
Contador.asp
<%@ Language=vb script:history.go(-1)
vti_cachedsvcrellinks:VX|SHUS|java script:history.go(-1)
vti_cachedbodystyle:SR|<BODY style="font-family:verdana; font-size:8pt;text-decoration:none;color:#333333;margin:0">
vti_cachedhasbots:BR|false
vti_cachedhastheme:BR|false
vti_cachedhasborder:BR|false
Ele abre mais não faz a atualização da estatistica que esta no arquivo Estatistica.mdb alguém poderia me informa onde esta o erro Desde já agradeço a todos Mais este scripts ContadorResultado.asp
<%@ Language=vb script:history.go(-1)" style="text-decoration:none">VOLTAR</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>

Autor: Alexander Luiz Marinho da Silva<br>
Versão: 1.1<br>
dúvidas e sugestões    : zz2ale@ig.com.br
</BODY>
</HTML>
<%detona%>
E tem a pasta _vti_cnf com este dois scripts Contador.asp
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|06 Dec 2004 16:32:56 -0000
vti_extenderversion:SR|4.0.2.8912
vti_filesize:IR|4891
vti_title:SR|TESTE
vti_backlinkinfo:VX|
vti_nexttolasttimemodified:TR|06 Dec 2004 16:32:55 -0000
vti_author:SR|IUSR_ANGHOST
vti_modifiedby:SR|IUSR_ANGHOST
vti_timecreated:TR|06 Dec 2004 16:32:33 -0000
vti_cacheddtm:TX|06 Dec 2004 16:32:56 -0000
vti_cachedlinkinfo:VX|H|ContadorResultado.asp
vti_cachedsvcrellinks:VX|FHUS|anneh/estatisticas/ContadorResultado.asp
vti_cachedtitle:SR|TESTE
vti_cachedbodystyle:SR|<BODY style="font-family:verdana; font-size:8pt;text-decoration:none;color:#333333">
vti_cachedhasbots:BR|false
vti_cachedhastheme:BR|false
vti_cachedhasborder:BR|false
ContadorResultado.asp
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|06 Dec 2004 16:33:22 -0000
vti_extenderversion:SR|4.0.2.8912
vti_backlinkinfo:VX|index.htm
vti_filesize:IR|6649
vti_metatags:VR|GENERATOR Microsoft\\ Visual\\ Studio\\ 6.0
vti_generator:SR|Microsoft Visual Studio 6.0
vti_nexttolasttimemodified:TR|06 Dec 2004 16:21:59 -0000
vti_author:SR|IUSR_ANGHOST
vti_modifiedby:SR|IUSR_ANGHOST
vti_timecreated:TR|06 Dec 2004 16:33:22 -0000
vti_cacheddtm:TX|06 Dec 2004 16:33:22 -0000
vti_cachedlinkinfo:VX|H|java script:history.go(-1)
vti_cachedsvcrellinks:VX|SHUS|java script:history.go(-1)
vti_cachedbodystyle:SR|<BODY style="font-family:verdana; font-size:8pt;text-decoration:none;color:#333333;margin:0">
vti_cachedhasbots:BR|false
vti_cachedhastheme:BR|false
vti_cachedhasborder:BR|false
O script ContadorResultado e este aqui, desculpe pelo erro de cima
<!--#include file="conexao.asp" -->
<%
'--------------------------------------------------------------------------------------------------
'    Autor                        : Alexander Luiz Marinho da Silva
'    Versão                    : 1.0
'    dúvidas e sugestões    : zz2ale@ig.com.br
'    Data                        : 02/12/2004
'    Descrição                : Sistema de visualização de estatística 
'    obs.                        : Este arquivo destina-se a monitorar as visitas feitas na página index.htm
'                                  Seu uso é livre, mas favor deixar o crédito.
'---------------------------------------------------------------------------------------------------
Session.LCID = 1046

dim RsDia, RsMes, RsAno, vSQL, totalMes, totalAno, cor
dim vData, vDia, vMes, vAno

vAno = Request.QueryString("ano")
if vAno = "" then
    vAno = "2009"
end if

vSQL = "select a.*, b.* from db_dia a, db_mes b where a.ano = b.ano and a.ano = '"& vAno &"' "
set RsDia = conn.execute(vSQL)

vSQL = "select * from db_mes where ano = '"& vAno &"' "
set RsMes = conn.execute(vSQL)
totalAno = RsMes(1) + RsMes(2) + RsMes(3) + RsMes(4) + RsMes(5) + RsMes(6) +_
               RsMes(7) + RsMes(8) + RsMes(9) + RsMes(10) + RsMes(11) + RsMes(12)

vSQL = "select ano from db_mes"
set RsAno = conn.execute(vSQL)

sub detona
    set RsMes = nothing
    set RsDia = nothing
    conn.close()
end sub
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<style>
.tabela
{
    font-family:verdana; font-size:8pt;text-decoration:none;color:#333333; 
    border-top:1px solid #000000;
    border-left:1px solid #000000;
    border-right:1px solid #000000;
    border-bottom:1px solid #000000;
}
</style>

<script LANGUAGE=javascript>

function BuscaAno(){

    frmBusca.action = "ContadorResultado.asp"
    frmBusca.submit();
}

function adicionaCor(param){

    if (param.style.backgroundColor == ""){
        param.style.backgroundColor = "#fbe9dd";
    }
}

function retiraCor(param){

    if (param.style.backgroundColor != "#fbe999"){
        param.style.backgroundColor = "";
    }
}

</SCRIPT>

<BODY style="font-family:verdana; font-size:8pt;text-decoration:none;color:#333333;margin:0">
<P>&nbsp;</P>

<form name="frmBusca">
Ano: 
<select name="ano" onChange="BuscaAno()">
    <option value=""> -- </option>
<%do while not RsAno.eof%>
    <option value="<%=RsAno("ano")%>"><%=RsAno("ano")%></option>
<%
    RsAno.movenext
    loop
%>
</select>
</form>
<br><br>
Estatística das visitas do ano de: <%=vAno%>
<table border="0" width="780" cellspacing="1" cellpadding="0" class="tabela">
<tr align="center" bgcolor="#eeeeee">
    <th align="right">dias =></th>
    <th>1</th>
    <th>2</th>
    <th>3</th>
    <th>4</th>
    <th>5</th>
    <th>6</th>
    <th>7</th>
    <th>8</th>
    <th>9</th>
    <th>10</th>
    <th>11</th>
    <th>12</th>
    <th>13</th>
    <th>14</th>
    <th>15</th>
    <th>16</th>
    <th>17</th>
    <th>18</th>
    <th>19</th>
    <th>20</th>
    <th>21</th>
    <th>22</th>
    <th>23</th>
    <th>24</th>
    <th>25</th>
    <th>26</th>
    <th>27</th>
    <th>28</th>
    <th>29</th>
    <th>30</th>
    <th>31</th>
    <th>Total mes</th>
</tr>
<%
do while not RsDia.eof
    if cor = "bbcedf" then
        cor = ""
    else
        cor = "bbcedf"
    end if

    totalMes = RsDia(0) + RsDia(1) + RsDia(2) + RsDia(3) + RsDia(4) + RsDia(5) + RsDia(6) + RsDia(7) + RsDia(8) + RsDia(9) +_
    RsDia(1) + RsDia(11) + RsDia(12) + RsDia(13) + RsDia(14) + RsDia(15) + RsDia(16) + RsDia(17) + RsDia(18) + RsDia(19) +_
    RsDia(20) + RsDia(21) + RsDia(22) + RsDia(23) + RsDia(24) + RsDia(25) + RsDia(26) + RsDia(27) + RsDia(28) + RsDia(29) + RsDia(30)
%>
<tr align="center" bgcolor="<%=cor%>" onMouseOver="adicionaCor(this);" onMouseOut="retiraCor(this);">
    <td bgcolor="#cccccc"><b><%=MonthName(RsDia(31), true)%>.</b></td>
    <td><%if RsDia(0) = "0" then%> - <%else%><%=RsDia(0)%><%end if%></td>
    <td><%if RsDia(1) = "0" then%> - <%else%><%=RsDia(1)%><%end if%></td>
    <td><%if RsDia(2) = "0" then%> - <%else%><%=RsDia(2)%><%end if%></td>
    <td><%if RsDia(3) = "0" then%> - <%else%><%=RsDia(3)%><%end if%></td>
    <td><%if RsDia(4) = "0" then%> - <%else%><%=RsDia(4)%><%end if%></td>
    <td><%if RsDia(5) = "0" then%> - <%else%><%=RsDia(5)%><%end if%></td>
    <td><%if RsDia(6) = "0" then%> - <%else%><%=RsDia(6)%><%end if%></td>
    <td><%if RsDia(7) = "0" then%> - <%else%><%=RsDia(7)%><%end if%></td>
    <td><%if RsDia(8) = "0" then%> - <%else%><%=RsDia(8)%><%end if%></td>
    <td><%if RsDia(9) = "0" then%> - <%else%><%=RsDia(9)%><%end if%></td>
    <td><%if RsDia(10) = "0" then%> - <%else%><%=RsDia(10)%><%end if%></td>
    <td><%if RsDia(11) = "0" then%> - <%else%><%=RsDia(11)%><%end if%></td>
    <td><%if RsDia(12) = "0" then%> - <%else%><%=RsDia(12)%><%end if%></td>
    <td><%if RsDia(13) = "0" then%> - <%else%><%=RsDia(13)%><%end if%></td>
    <td><%if RsDia(14) = "0" then%> - <%else%><%=RsDia(14)%><%end if%></td>
    <td><%if RsDia(15) = "0" then%> - <%else%><%=RsDia(15)%><%end if%></td>
    <td><%if RsDia(16) = "0" then%> - <%else%><%=RsDia(16)%><%end if%></td>
    <td><%if RsDia(17) = "0" then%> - <%else%><%=RsDia(17)%><%end if%></td>
    <td><%if RsDia(18) = "0" then%> - <%else%><%=RsDia(18)%><%end if%></td>
    <td><%if RsDia(19) = "0" then%> - <%else%><%=RsDia(19)%><%end if%></td>
    <td><%if RsDia(20) = "0" then%> - <%else%><%=RsDia(20)%><%end if%></td>
    <td><%if RsDia(21) = "0" then%> - <%else%><%=RsDia(21)%><%end if%></td>
    <td><%if RsDia(22) = "0" then%> - <%else%><%=RsDia(22)%><%end if%></td>
    <td><%if RsDia(23) = "0" then%> - <%else%><%=RsDia(23)%><%end if%></td>
    <td><%if RsDia(24) = "0" then%> - <%else%><%=RsDia(24)%><%end if%></td>
    <td><%if RsDia(25) = "0" then%> - <%else%><%=RsDia(25)%><%end if%></td>
    <td><%if RsDia(26) = "0" then%> - <%else%><%=RsDia(26)%><%end if%></td>
    <td><%if RsDia(27) = "0" then%> - <%else%><%=RsDia(27)%><%end if%></td>
    <td><%if RsDia(28) = "0" then%> - <%else%><%=RsDia(28)%><%end if%></td>
    <td><%if RsDia(29) = "0" then%> - <%else%><%=RsDia(29)%><%end if%></td>
    <td><%if RsDia(30) = "0" then%> - <%else%><%=RsDia(30)%><%end if%></td>
    <td align="right"><%=totalMes%></td>
</tr>
<%
    RsDia.movenext
    loop
%>
<tr bgcolor="#eeeeee" align="center">
    <td colspan="33" bgcolor="000000" height="1"></td>
</tr>
<tr bgcolor="#eeeeee" align="center" style="color:red">
    <td colspan="32">
        Total do ano de <%=RsMes(13)%>
    </td>
    <td align="right">
        <%=totalAno%>
    </td>
</tr>
</table>
<br><br><br><br><br>
<a href="java script:history.go(-1)" style="text-decoration:none">VOLTAR</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>

Autor: Alexander Luiz Marinho da Silva<br>
Versão: 1.1<br>
dúvidas e sugestões    : zz2ale@ig.com.br
</BODY>
</HTML>
<%detona%>
Esquece o primeiro code de ContadorResultado.asp pois ele esta incompleto o que eu me referi e o terceiro ContadorResultado.asp Seque abaixos os code certo pois na hora de copia-los acabei copiando pela metade Seque os code certo Conexão.asp
<%
    way = server.MapPath("estatistica.mdb")
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & way
SET CONN = SERVER.CREATEOBJECT("ADODB.CONNECTION")    
CONN.OPEN strConn

'Response.Write conn.State
'Response.End 

'    1 = aberto
'    0 = fechado
%>
Contador.asp
<%@ Language=vb script:history.go(-1)" style="text-decoration:none">VOLTAR</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>

Autor: Alexander Luiz Marinho da Silva<br>
Versão: 1.1<br>
dúvidas e sugestões    : zz2ale@ig.com.br
</BODY>
</HTML>
<%detona%>
Os que estão na pasta _vti_cnf Contador.asp
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|06 Dec 2004 16:32:56 -0000
vti_extenderversion:SR|4.0.2.8912
vti_filesize:IR|4891
vti_title:SR|TESTE
vti_backlinkinfo:VX|
vti_nexttolasttimemodified:TR|06 Dec 2004 16:32:55 -0000
vti_author:SR|IUSR_ANGHOST
vti_modifiedby:SR|IUSR_ANGHOST
vti_timecreated:TR|06 Dec 2004 16:32:33 -0000
vti_cacheddtm:TX|06 Dec 2004 16:32:56 -0000
vti_cachedlinkinfo:VX|H|ContadorResultado.asp
vti_cachedsvcrellinks:VX|FHUS|anneh/estatisticas/ContadorResultado.asp
vti_cachedtitle:SR|TESTE
vti_cachedbodystyle:SR|<BODY style="font-family:verdana; font-size:8pt;text-decoration:none;color:#333333">
vti_cachedhasbots:BR|false
vti_cachedhastheme:BR|false
vti_cachedhasborder:BR|false
ContadorResultado.asp
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|06 Dec 2004 16:33:22 -0000
vti_extenderversion:SR|4.0.2.8912
vti_backlinkinfo:VX|index.htm
vti_filesize:IR|6649
vti_metatags:VR|GENERATOR Microsoft\\ Visual\\ Studio\\ 6.0
vti_generator:SR|Microsoft Visual Studio 6.0
vti_nexttolasttimemodified:TR|06 Dec 2004 16:21:59 -0000
vti_author:SR|IUSR_ANGHOST
vti_modifiedby:SR|IUSR_ANGHOST
vti_timecreated:TR|06 Dec 2004 16:33:22 -0000
vti_cacheddtm:TX|06 Dec 2004 16:33:22 -0000
vti_cachedlinkinfo:VX|H|java script:history.go(-1)
vti_cachedsvcrellinks:VX|SHUS|java script:history.go(-1)
vti_cachedbodystyle:SR|<BODY style="font-family:verdana; font-size:8pt;text-decoration:none;color:#333333;margin:0">
vti_cachedhasbots:BR|false
vti_cachedhastheme:BR|false
vti_cachedhasborder:BR|false

Desculpe pela bagunça de cima

Amigos desculpe mais não sei o que esta acontecendo eu copio os code mais quando colo ele não esta colando por inteiro

Link para o comentário
Compartilhar em outros sites

  • 0

Vamos ve se agora eu consigo exolicar melhor o qual e a minha duvida

Este script de estatistica, funciona, mais ele não esta fazendo a atualização no arquivo DB

O primeio script que esta na pagina estatistica e este

conexao.asp

<%
    way = server.MapPath("estatistica.mdb")
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & way
SET CONN = SERVER.CREATEOBJECT("ADODB.CONNECTION")    
CONN.OPEN strConn

'Response.Write conn.State
'Response.End 

'    1 = aberto
'    0 = fechado
%>
O segundo e este contador.asp
<%@ Language=VBScript %>
<!--#include file="conexao.asp" -->
<%
'--------------------------------------------------------------------------------------------------
'    Autor                        : Alexander Luiz Marinho da Silva
'    Versão                    : 1.1
'    dúvidas e sugestões    : zz2ale@ig.com.br
'    Data                        : 06/12/2004
'    Descrição                : Sistema de gerenciamento de estatística 
'    obs.                        : Este arquivo destina-se a gerenciar as visitas feitas num site.
'                                  Este gerenciamento é feito guardando em um Banco Acess os 
'                                  visitantes do dia, do mês e do ano.
'                                  e a cada ano novo na db_dia é inserido mais um grupo de dias de
'                                  todos os meses do novo ano que se inicia.
'---------------------------------------------------------------------------------------------------

'------------------------------------------------
'    1 - esta session serve para traduzir o calendário do 
'         servidor de inglês para português se for o caso.
Session.LCID = 1046
'------------------------------------------------

dim RsRevisitas, RsVisitas, RsMes, RsDia, RsTotalMes, RsTotalDia, RsIn, vSQL
dim vData, aData, vDia, vMes, vAno, totalMes, totalDia, totalAno, x

vData = FormatDateTime(Date(), 2)
aData = Split(vData, "/")
vDia     = Trim(aData(0))
vMes     = Trim(aData(1))
vAno     = Trim(aData(2))

sub executa
'--------------------------------------------------------------------------------------------------
'    1.2 - aqui estes selects pegarão a quantidade de visitantes por mes e dia respectivamente.
    vSQL = "select * from db_mes order by ano desc"
    set RsTotalMes = conn.execute(vSQL)
    totalAno = RsTotalMes(1) + RsTotalMes(2) + RsTotalMes(3) + RsTotalMes(4) + RsTotalMes(5) + RsTotalMes(6) +_
                   RsTotalMes(7) + RsTotalMes(8) + RsTotalMes(9) + RsTotalMes(10) + RsTotalMes(11) + RsTotalMes(12) 
    vSQL = "select * from db_dia where "& vDia &" = "& vDia &" and mes = "& vMes & " and ano = '" & vAno &"' "
    set RsTotalDia = conn.execute(vSQL)
'---------------------------------------------------------------------------------------------------
'    1.3 - se o ano atual(vAno) for maior do que o que está sendo selecionado na tb_mes.ano 
'            o código insere mais um grupo de doze(12) linhas representando o novo ano que se inicia na db_dia
'            para fazer a contagem de visitantes por dias do mês
'            e insere também mais uma linha na db_mes para fazer a contagem dos visitantes de um determinado mês.
    if vAno > RsTotalMes("ano") then
        for x = 1 to 12
            vSQL = "insert into db_dia ( "&_
                       "    1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "&_
                       "    13, 14, 15, 16, 17, 18, 19, 20, 21, 22, "&_
                       "    23, 24, 25, 26, 27, 28, 29, 30, 31, mes, ano) "&_
                       "values( "&_
                       "    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "&_
                       "    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "&_
                       "    0, 0, 0, 0, 0, 0, 0, "& x &", "& vAno &")"
            set RsIn = conn.execute(vSQL)
            set RsIn = nothing
        next
    
        vSQL = "insert into db_mes ( "&_
                   "    1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ano) "&_
                   "values( "&_
                   "    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "& vAno &")"
        set RsIn = conn.execute(vSQL)
    end if
'----------------------------------------------------------------------------------------------------
'    1.4 - após pegar a quantidade de visitantes por mes e dia no ítem 1.2 
'            aqui é feito o incremento de mais um visitante e ao mesmo tempo
'            as db_mes e db_dia são atualizadas com os novos valores de acordo com o dia atual.
        totalMes = RsTotalMes(vMes) + 1
        vSQL = "update db_mes set "& vMes &" = "& totalMes &" where ano = '"& RsTotalMes("ano") &"' "
        set RsMes = conn.execute(vSQL)
        totalDia = RsTotalDia(vDia) + 1
        vSQL = "update db_dia set "& vDia &" = "& totalDia &" where mes = "& vMes &" and ano = '"& vAno &"' "
        set RsDia = conn.execute(vSQL)
'-----------------------------------------------------------------------------------------------------
end sub

sub detona
    set RsRevisitas = nothing
    set RsVisitas     = nothing
    set RsTotalMes = nothing
    set RsTotalDia     = nothing
    set RsMes         = nothing
    set RsIn             = nothing
    set RsDia         = nothing
    set RsUpd         = nothing
    conn.close()
end sub
%>

<html>
<head>
<title>TESTE</title>

</HEAD>
<BODY style="font-family:verdana; font-size:8pt;text-decoration:none;color:#333333">

<P>PAGINA DE TESTE DE VISITANTES...</P>

<%
executa
detona
%>

Total dia <b><%=vDia%></b>: <%=totalDia%> <br>
Total do mes <b><%=UCase(MonthName(vMes, false))%></b>: <%=totalMes%> <br>
Total do ano de <b><%=vAno%></b>: <%=totalAno%>
<br><br>
Para ver a estatística do ano clique abaixo:<br>
<a href="ContadorResultado.asp" style="text-decoration:none">Estatísticas</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>

Autor: Alexander Luiz Marinho da Silva<br>
Versão: 1.1<br>
dúvidas e sugestões    : zz2ale@ig.com.br
</BODY>
</HTML>

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...