- Fórum WMO
- → invictus's Content
invictus's Content
There have been 52 items by invictus (Search limited from 09/05/2023)
#163609 Criar Testes Em Flash
Posted by invictus on 06/08/2003, 16:58 in Adobe Flash e ActionScript
#162956 Criar Testes Em Flash
Posted by invictus on 05/08/2003, 16:06 in Adobe Flash e ActionScript
#159022 Usando Msde, Não Reconhece Função Date
Posted by invictus on 31/07/2003, 17:42 in ASP
tranferi para o MSDE, só que agora um script meu não funciona, aparece o seguinte problema:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]'date' is not a recognized function name.
/testartododia.asp, line 68
está dando pau na hora que executa isto aqui:
SQL = "SELECT his_type, his_year, his_title, his_desc, his_image, his_link FROM tododiadata WHERE his_day = datepart('d', date()) AND his_month = datepart('m', date()) ORDER BY his_type, his_year "
set rsGlobal = connGlobal.execute(SQL)
ou seja, preciso saber a data do sistema para chamar o respectivo registro
alguém já passou por isso? Tem idéia do que eu posso fazer?
#146606 Sistema De Combo
Posted by invictus on 16/07/2003, 17:53 in ASP
http://forum.wmonlin...=21697&hl=combo
é bem parecido, o que eu preciso é mais simples até, pois não precisa de refresh
#141591 Fazer Sistema De Consulta Por Combo
Posted by invictus on 10/07/2003, 16:55 in ASP
<%
Dim con, data_source
data_source = "driver=MySQL;server=127.0.0.1;uid=root;pwd=;database=teste"
Set con = Server.CreateObject("ADODB.Connection")
con.cursorlocation = 3
con.Open data_source
Response.Buffer = False
estado = request("estado")
sql = "select * from estados order by descricao"
set rs = con.execute(sql)
%>
<html>
<head></head>
<body>
<form name="form1" method="post">
<select name="estado" onchange="window.navigate('index.asp?estado='+form1.estado.value)">
<option value="SELECIONE">Selecione o estado</option>
<% while not rs.eof %>
<option value="<%=rs("id")%>"> <%=rs("descricao")%> </option>
<%
rs.movenext
wend %>
</select>
<%
if estado = "" then
%>
<select name="cidade">
<option value="SELECIONE">Selecione a cidade</option>
</select>
<% else
sqlcid = "select * from cidades where idestado = '" &estado& "'"
set rs1 = con.execute(sqlcid)
%>
<select name="cidade">
<option value="SELECIONE">Selecione a cidade</option>
<% while not rs1.eof %>
<option value="<%=rs1("id")%>"> <%=rs1("descricao")%> </option>
<%
rs1.movenext
wend %>
</select>
<% end if %>
</form>
</body>
</html>
#129612 Conexão
Posted by invictus on 26/06/2003, 16:39 in ASP
<%
p_nome = Request.Form("p_nome")
p_sexo = Request.Form("p_sexo")
p_cidade = Request.Form("p_cidade")
p_estado = Request.Form("p_estado")
p_emeio = Request.Form("p_emeio")
set usuarios1DB = server.CreateObject("ADODB.CONNECTION")
usuarios1DB.Open "usuarios"
theSQL = "insert into dados "
theSQL = theSQL & "(nome, sexo, cidade, estado, "
theSQL = theSQL & "emeio)"
theSQL = theSQL & " values ('"&p_nome&"', '"&p_sexo&"', '"
theSQL = theSQL & p_cidade&"', '"&p_estado&"', '"&p_emeio&"')"
usuarios1DB.Execute(theSQL)
usuarios1DB.close
set usuarios1DB = Nothing
set usuarios2DB = server.CreateObject("ADODB.CONNECTION")
usuarios2DB.Open "email"
theSQL2 = "insert into dados "
theSQL2 = theSQL & "(email)"
theSQL2 = theSQL & " values ('"&p_emeio&"')"
usuarios2DB.Execute(theSQL2)
usuarios2DB.close
set usuarios2DB = Nothing
%>
mas nao ta funcionando alguem tem algum ideia??
#118012 Sistema De Noticias | Uma Para Cada Dia Do Mes
Posted by invictus on 12/06/2003, 15:00 in ASP
<%
'abre a conexão com banco de dados
Set noticiasDB = Server.CreateObject("ADODB.Connection")
noticiasDB.Open "DBQ=" & Server.MapPath("tab-noticias.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
data = 1
sql = "SELECT * FROM tab-noticias WHERE data_exib='"&data&"'"
Set rs = noticiasDB.Execute(sql)
%>
<%=rs("txt")%>
e o erro que deu:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][Driver ODBC para Microsoft Access] Erro de sintaxe na cláusula FROM.
/almanaque/noticias.asp, line 13
#117291 Mudanças No Chacal Mail
Posted by invictus on 11/06/2003, 13:54 in ASP
<script LANGUAGE = "JavaScript">
<!--
function abre(palavra)
{
window.open(palavra,'gloss','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=no,copyhistory=no,width=500,height=500');
}
// -->
</script>
pq eu coloquei como vc falou, o redirect funciono mas nao abriu a pop up. Existe já a pg obrigado.asp, está td no mesmo diretorio
#116523 Problemas Na Newsletter
Posted by invictus on 10/06/2003, 13:32 in ASP
Server.MapPath() error 'ASP 0171 : 80004005'
Missing Path
/cons.asp, line 4
The Path parameter must be specified for the MapPath method.
o arquivo é este:
<!--#include file="config.asp"-->
<%
Set Conexao = CreateObject("ADODB.CONNECTION")
conStr ="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath(dados)
ConexaoAberta = FALSE
Sub AbreConexao()
if not ConexaoAberta then
Conexao.Open ConStr
ConexaoAberta = True
end if
end sub
Sub FechaConexao()
if ConexaoAberta then
Conexao.close
ConexaoAberta = False
end if
end sub
Function ValidaEmail(email)
Dim totCaracteres,Caractere
totCaracteres = Len(email)
for I = 1 to totcaracteres
Caractere = Mid(email,I,1)
if Caractere = "@" then
validaEmail = "Verdadeiro"
exit for
else
ValidaEmail = "Falso"
End If
Next
End Function
%>
no meu servidor é assim: uma pasta SITE e uma pasta DADOS para o bd
já mexi no chmod como vc disse
#115726 Problemas Na Newsletter
Posted by invictus on 09/06/2003, 14:34 in ASP
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/newsletter/mail.asp, line 36
teve esse topico que apresentou o mesmo problema.
http://forum.wmonlin...1&hl=newsletter
alguem tem alguma ideia?
#112863 Mudanças No Chacal Mail
Posted by invictus on 05/06/2003, 15:03 in ASP
aqui esta o codigo de mail.asp
<!--#include file="cons.asp"-->
<% If Request.Form("acao") = "OK" Then
set Dicionario = CreateObject("scripting.dictionary")
i = 0
if Request.Form("email")="" then
Dicionario.add i, "É obrigatorio preencher o email!"
i = i+1
end if
Validar = ValidaEmail(request.form("email"))
If Validar = "Falso" then
Dicionario.add i, "E-Mail preenchido incorretamente!"
i = i+1
end if
AbreConexao
Sql = "SELECT email FROM dados WHERE email = '" & Request.form("email") & "'"
set Rs =Conexao.Execute(Sql)
If not Rs.Eof then
Dicionario.add i, "E-Mail já cadastrado!"
i= i+1
end if
FechaConexao
Vet = Dicionario.items
if Dicionario.Count<>0 then
Response.Write "<center><font face=verdana size=1 color=red>"
Response.Write "Verifique isso:<br>"
for i = 0 to Dicionario.Count - 1
Response.Write vet(i) & "<br>"
next
Response.Write "</font></center>"
else
AbreConexao
Sql = "INSERT INTO dados (email) "
Sql = Sql & "VALUES('" & Request.Form("email") & "')"
Conexao.Execute(Sql)
FechaConexao
%>
<p><img src="../images/logo-almanaque.gif" width="284" height="98"></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Obrigado por se
cadastrar!</font>
<p><a href="../index.asp"><img src="../images/mao_esq.jpg" width="65" height="31" border="0"></a></p>
<% End If %>
<% Else
set Dicionario = CreateObject("scripting.dictionary")
i = 0
if Request.Form("email")="" then
Dicionario.add i, "É obrigatorio preencher o email!"
i = i+1
end if
AbreConexao
Sql = "SELECT email FROM dados WHERE email = '" & Request.form("email") & "'"
set Rs =Conexao.Execute(Sql)
If Rs.Eof then
Dicionario.add i, "E-Mail não cadastrado!"
i= i+1
end if
FechaConexao
Vet = Dicionario.items
if Dicionario.Count<>0 then
Response.Write "<center><font face=verdana size=1 color=red>"
Response.Write "Verifique isso:<br>"
for i = 0 to Dicionario.Count - 1
Response.Write vet(i) & "<br>"
next
Response.Write "</font></center>"
else
AbreConexao
Sql = "DELETE * FROM dados WHERE email = '" & Request.form("email") & "'"
Conexao.Execute(Sql)
FechaConexao %>
Email <%=Request.form("email")%> deletado com sucesso!
<% end if %>
<% end if %>
na parte roxa é onde tentei colocar o codigo que vc me deu mas nao rolou..
#91086 Validar Formulario
Posted by invictus on 04/05/2003, 02:24 in ASP
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][Driver ODBC para Microsoft Access] O campo 'veget.endereco' não pode ser uma seqüência de caracteres de comprimento zero.
#79935 Problemas Com O Cdonts
Posted by invictus on 18/04/2003, 16:19 in ASP
otavio: se eu entendi direito nesse script nao precisa incluir smtp. ele tá hospedado
no websamba http://www.websamba.com/veget
a linha 69 é
'Send the e-mail
objCDOMail.Send
#79061 Problemas Com O Cdonts
Posted by invictus on 17/04/2003, 02:19 in ASP
Microsoft VBScript runtime error '800a0046'
Permission denied
/veget/send_email_veget.asp, line 69
alguém tem ideia do que pode estar errado? o site tá hospedado no websamba, há a possibilidade desse servidor não suportar o componente cdo?
------------------------------------------------------------------------------------
<%@ language="vbscript" %>
<%
'The Surf-Net e-mail script and form is written by Bruce Corkhill ©2001
'If you want your own e-mail script and form then goto 'http://www.surf-net.co.uk
'Set the response buffer to true so we execute all code before sending to the clients browser
Response.Buffer = True
'Dimension variables
Dim strBody 'Holds the body of the e-mail
Dim objCDOMail 'Holds the mail server object
Dim strMyEmailAddress 'Holds your e-mail address
Dim strCCEmailAddress 'Holds any carbon copy e-mail addresses if you want to send to more tahn on e-mail address
Dim strReturnEmailAddress 'Holds the return e-mail address of the user
'----------------- Place your e-mail address in the following sting ----------------------------------
strMyEmailAddress = "yourmail@hotmail.com"
'-----------------------------------------------------------------------------------------------------
'----------- Place Carbon Copy e-mail address's in the following sting, supporated by ; --------------
'Use this string only if you want to send the copy's of the e-mail to more than one person
strCCEmailAddress = ""
'-----------------------------------------------------------------------------------------------------
'Read in the users e-mail address
strReturnEmailAddress = Request.Form("email")
'Initialse strBody string with the body of the e-mail
strBody = "Name: " & Request.Form("nome") & vbCrLf & vbCrLf
strBody = strBody & "E-mail: " & strReturnEmailAddress & vbCrLf & vbCrLf
strBody = strBody & "Enquiry: - " & vbCrLf & Request.Form("mensagem") & vbCrLf
'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
'Send the e-mail
'Who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objCDOMail.From = Request.Form("nome") & " " & " <" & strReturnEmailAddress & ">"
'Who the e-mail is sent to
objCDOMail.To = strMyEmailAddress
'Who the carbon copies are sent to
objCDOMail.Cc = strCCEmailAddress
'The subject of the e-mail
objCDOMail.Subject = "email restaurantes vegetarianos"
'The main body of the e-amil
objCDOMail.Body = strBody
'The format the e-mail is sent in
objCDOMail.MailFormat = CdoMailFormatText 'If you want it to be in MIME(HTML) format use CdoMailFormatMIME
'Importance of the e-mail (0=Low, 1=Normal, 2=High)
objCDOMail.Importance = 1
'Send the e-mail
objCDOMail.Send
'Close the server object
Set objCDOMail = Nothing
%>
- Fórum WMO
- → invictus's Content
- Privacy Policy
- Regras ·