Ir para conteúdo

POWERED BY:

Arquivado

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

Régis Nogueira

Erro 80004005

Recommended Posts

Tenho uma página que ainda não foi publicada na internet. É um sistema de login automático, ou seja, um campo para o nome, uma para senha, um checkbox. O usuário se cadastra e ao clicar no botão do forma ele é levado a uma página sucesso.htm e sua informações são gravadas em um banco de dados access. O problema é que quando executo a página o seguinte erro aparece:Provider error '80004005'erro não especificado/login asp teste/TMP1kvq1fvmfc.asp, line 122O conteúdo da linha 122 é o seguinte:119: Set MM_editCmd = Server.CreateObject("ADODB.Command")120: MM_editCmd.ActiveConnection = MM_editConnection121: MM_editCmd.CommandText = MM_editQuery122: MM_editCmd.Execute123: MM_editCmd.ActiveConnection.CloseQuem puder ajudar eu agradeço.

Compartilhar este post


Link para o post
Compartilhar em outros sites

cara, só vendo o codigo inteiro....

Fala Gastão, taí o código completo:<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><!--#include file="Connections/novo_login_asp.asp" --><%' *** Edit Operations: declare variablesDim MM_editActionDim MM_abortEditDim MM_editQueryDim MM_editCmdDim MM_editConnectionDim MM_editTableDim MM_editRedirectUrlDim MM_editColumnDim MM_recordIdDim MM_fieldsStrDim MM_columnsStrDim MM_fieldsDim MM_columnsDim MM_typeArrayDim MM_formValDim MM_delimDim MM_altValDim MM_emptyValDim MM_iMM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))If (Request.QueryString <> "") ThenMM_editAction = MM_editAction & "?" & Request.QueryStringEnd If' boolean to abort record editMM_abortEdit = false' query string to executeMM_editQuery = ""%><%' *** Insert Record: set variablesIf (CStr(Request("MM_insert")) = "form1") ThenMM_editConnection = MM_novo_login_asp_STRINGMM_editTable = "login_automatico_ASP"MM_editRedirectUrl = "/sucesso.htm"MM_fieldsStr = "usuario|value|senha|value"MM_columnsStr = "nome|',none,''|senha|',none,''"' create the MM_fields and MM_columns arraysMM_fields = Split(MM_fieldsStr, "|")MM_columns = Split(MM_columnsStr, "|")' set the form valuesFor MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))Next' append the query string to the redirect URLIf (MM_editRedirectUrl <> "" And Request.QueryString <> "") ThenIf (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") ThenMM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryStringElseMM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryStringEnd IfEnd IfEnd If%><%' *** Insert Record: construct a sql insert statement and execute itDim MM_tableValuesDim MM_dbValuesIf (CStr(Request("MM_insert")) <> "") ThenIf Request.Form("autologin") = "True" ThenResponse.Cookies("autologin") = "True"Response.Cookies("usuario") = Request.Form("usuario")Response.Cookies("senha") = Request.Form("senha")End If' create the sql insert statementMM_tableValues = ""MM_dbValues = ""For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2MM_formVal = MM_fields(MM_i+1)MM_typeArray = Split(MM_columns(MM_i+1),",")MM_delim = MM_typeArray(0)If (MM_delim = "none") Then MM_delim = ""MM_altVal = MM_typeArray(1)If (MM_altVal = "none") Then MM_altVal = ""MM_emptyVal = MM_typeArray(2)If (MM_emptyVal = "none") Then MM_emptyVal = ""If (MM_formVal = "") ThenMM_formVal = MM_emptyValElseIf (MM_altVal <> "") ThenMM_formVal = MM_altValElseIf (MM_delim = "'") Then ' escape quotesMM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"ElseMM_formVal = MM_delim + MM_formVal + MM_delimEnd IfEnd IfIf (MM_i <> LBound(MM_fields)) ThenMM_tableValues = MM_tableValues & ","MM_dbValues = MM_dbValues & ","End IfMM_tableValues = MM_tableValues & MM_columns(MM_i)MM_dbValues = MM_dbValues & MM_formValNextMM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"If (Not MM_abortEdit) Then' execute the insertSet MM_editCmd = Server.CreateObject("ADODB.Command")MM_editCmd.ActiveConnection = MM_editConnectionMM_editCmd.CommandText = MM_editQueryMM_editCmd.ExecuteMM_editCmd.ActiveConnection.CloseIf (MM_editRedirectUrl <> "") ThenResponse.Redirect(MM_editRedirectUrl)End IfEnd IfEnd If%><html><head><title>_____ LOGIN ASP Teste _____</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="/css/modformloginasp.css" rel="stylesheet" type="text/css"></head><body bgcolor="#e9e9e9" text="#000000" link="#006666" vlink="#006666" alink="#006666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="document.form1.submit();"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td height="50" bgcolor="#000000"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif"><strong>____ LOGIN AUTOMÁTICO ASP</strong></font></td></tr><tr><td valign="top"> <div align="left"><br><%Dim DiaSemana(7)DiaSemana(1) = "Domingo"DiaSemana(2) = "Segunda"DiaSemana(3) = "Terça"DiaSemana(4) = "Quarta"DiaSemana(5) = "Quinta"DiaSemana(6) = "Sexta"DiaSemana(7) = "Sábado"%><font face="verdana" size="1" color="#000000"><b>Hoje é <%=DiaSemana(Weekday(Date)) %> - Feira</b></font><br><br></div><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> <td colspan="3"> <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr bgcolor="#CCCCCC"> <td colspan="3"><font color="#CCCCCC" size="1" face="Arial, Helvetica, sans-serif">1</font></td></tr><tr> <td width="48%"> </td><td width="2%" bgcolor="#CCCCCC"> </td><td width="50%"> </td></tr></table></td></tr><tr> <td width="29%"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> <td height="12" bgcolor="#CCCCCC"><font color="#CCCCCC" size="1" face="Arial, Helvetica, sans-serif">1</font></td></tr></table></td><td width="39%"> <form action="<%=MM_editAction%>" method="POST" name="form1"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> <td width="15%" height="25" bgcolor="#CCCCCC"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">  Login</font></strong></td><td width="52%" height="25" bgcolor="#CCCCCC"> <input name="usuario" type="text" class="modformloginasp" id="usuario" value="<%=Request.Cookies("usuario")%>"></td><td width="33%" height="25" bgcolor="#CCCCCC"> </td></tr><tr> <td height="25" bgcolor="#CCCCCC"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">  Senha</font></strong></td><td height="25" bgcolor="#CCCCCC"> <input name="senha" type="password" class="modformloginasp" id="senha" value="<%=Request.Cookies("senha")%>"></td><td height="25" bgcolor="#CCCCCC"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <input name="autologin" type="checkbox" id="autologin" value="true" checked>autologin</font></strong></td></tr><tr bgcolor="#999999"> <td height="35" colspan="2"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">- Esqueci minha senha, e agora ?</font> </td><td height="35"> <div align="center"> <input name="entrar" type="submit" class="modformloginasp" id="entrar" value="Entrar"></div></td></tr></table><input type="hidden" name="MM_insert" value="form1"></form></td><td width="32%"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> <td height="13" bgcolor="#CCCCCC"><font color="#CCCCCC" size="1" face="Arial, Helvetica, sans-serif">1</font></td></tr></table></td></tr><tr> <td colspan="3"> </td></tr></table></td></tr><tr><td height="12" bgcolor="#000000"> <div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">© 2003 - 2004. Régis Nogueira Web Master</font></div></td></tr></table></body></html>

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.