- Fórum WMO
- → invictus's Content
invictus's Content
There have been 52 items by invictus (Search limited from 28/04/2023)
#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.
#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?
#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
#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
#190960 Problemas No Select
Posted by invictus on 19/09/2003, 15:56 in ASP
<form method="post" action="tddia/tddia_search.asp">
<div align="center"><span class="conteudo">Dia:</span>
<select name="p_dia" class="conteudo">
<option value="0">__</option>
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7">07</option>
<option value="8">08</option>
<option value="9">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<span class="conteudo">Mês:</span>
<select name="p_mes" class="conteudo">
<option value="0">_________</option>
<option value="1">Janeiro</option>
<option value="2">Fevereiro</option>
<option value="3">Março</option>
<option value="4">Abril</option>
<option value="5">Maio</option>
<option value="6">Junho</option>
<option value="7">Julho</option>
<option value="8">Agosto</option>
<option value="9">Setembro</option>
<option value="10">Outubro</option>
<option value="11">Novembro</option>
<option value="12">Dezembro</option>
</select>
<input type="submit" value="OK" class="bodytxt" style="border-style: solid; border-width: 1; background-color: ffffcc" name="submit">
</div>
</form>
e esta pg para busca:
<%
p_dia = Request.Form("p_dia")
p_mes = Request.Form("p_mes")
set usuariosDB = server.createObject("ADODB.Connection")
usuariosDB.open "almanaque"
sql = "select tododiadata.his_month, "
sql = sql & "tododiadata.his_link "
sql = sql & "From tododiadata "
sql = sql & "Where tododiadata.his_month = '"& p_mes &"'"
set tddiaset = usuariosDB.Execute(sql)
while not tddiaset.EOF
Response.Write tddiaset("his_link")
tddiaset.MoveNext
wend
tddiaset.Close
set tddiaset = Nothing
usuariosDB.close
set usuariosDB = Nothing
%>
está acontecendo este erro:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][Driver ODBC para Microsoft Access] Tipo de dados imcompatível na expressão de critério.
/almanaque/tddia/tddia_search.asp, line 15
alguem tem ideia de como posso resolver?
#185274 Problemas No Insert
Posted by invictus on 11/09/2003, 13:32 in PHP
fagundes: se eu soubesse "fazer" não estaria postando aqui. Alias nem consultaria esse forum, que é pra tirar duvidas. Eu nao apenas copiei e vi que nao tava rodando, eu já tentei solucionar, incluindo ate o que me passaram num outro post que foi colocar $HTTP_POST_VARS[txtTitulo]
mas nao funcionou.
#185240 Problemas No Insert
Posted by invictus on 11/09/2003, 12:41 in PHP
<?php
//????? -esta dando pau
$txtCodLivro = trim($txtCodLivro);
$txtCodCat = trim($txtCodCat);
$txtTitulo = trim($txtTitulo);
$txtAutor = trim($txtAutor);
$txtNPaginas = trim($txtNPaginas);
$txtFormato = trim($txtFormato);
$txtPreco = trim($txtPreco);
$txtResenha = trim($txtResenha);
$txtCapa = trim($txtCapa);
$txtDtLanc = trim($txtAno) + trim($txtMes) + trim($txtDia);
//abre conexao (abreconexao.inc nao funcionou coloquei .php)
include "abreconexao.php";
//cria sentença sql de inclusao
$sqlINS = "insert into livros ";
$sqlINS = $sqlINS . "(codLivro, codCat, titulo, autor, npaginas, formato, preco, resenha, dtLanc, capa) ";
$sqlINS = $sqlINS . "values ('$txtCodLivro', ";
$sqlINS = $sqlINS . "'$txtCodCat', ";
$sqlINS = $sqlINS . "'$txtTitulo', ";
$sqlINS = $sqlINS . "'$txtAutor', ";
$sqlINS = $sqlINS . "'$txtNPaginas', ";
$sqlINS = $sqlINS . "'$txtFormato', ";
$sqlINS = $sqlINS . "'$txtPreco', ";
$sqlINS = $sqlINS . "'$txtResenha', ";
$sqlINS = $sqlINS . "'$txtDtLanc', ";
$sqlINS = $sqlINS . "'$txtCapa')";
//carrega registros selecionados
$rs = mysql_query($sqlINS, $conexao) or die ("nao conseguiu executar instrução INSERT");
$numRegistros = mysql_num_rows($rs)
?>
o livro <?php echo $txtTitulo; ?> foi incluido com sucesso<br><br>
<a href="cap10lab11.htm">clique para inserir novo livro</a>
<?php
mysql_close($conexao);
?>
e apresenta este erro:
Notice: Undefined variable: txtCodLivro in C:\serieweb\php\cap10lab11.php on line 4
Notice: Undefined variable: txtCodCat in C:\serieweb\php\cap10lab11.php on line 5
Notice: Undefined variable: txtTitulo in C:\serieweb\php\cap10lab11.php on line 6
Notice: Undefined variable: txtAutor in C:\serieweb\php\cap10lab11.php on line 7
Notice: Undefined variable: txtNPaginas in C:\serieweb\php\cap10lab11.php on line 8
Notice: Undefined variable: txtFormato in C:\serieweb\php\cap10lab11.php on line 9
Notice: Undefined variable: txtPreco in C:\serieweb\php\cap10lab11.php on line 10
Notice: Undefined variable: txtResenha in C:\serieweb\php\cap10lab11.php on line 11
Notice: Undefined variable: txtCapa in C:\serieweb\php\cap10lab11.php on line 12
Notice: Undefined variable: txtAno in C:\serieweb\php\cap10lab11.php on line 13
Notice: Undefined variable: txtMes in C:\serieweb\php\cap10lab11.php on line 13
Notice: Undefined variable: txtDia in C:\serieweb\php\cap10lab11.php on line 13
nao conseguiu executar instrução INSERT
alguem pode dizer como resolver?
#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?
#183508 Problemas Com Variaveis Numa Form
Posted by invictus on 08/09/2003, 01:00 in PHP
<html>
<head>
<title> acessando dados</title>
</head>
<body>
<b>pesquisa por titulo:</b> <br>
<form method="post" action="cap9lab51.php">
titulo: <input type="text" name="txtTitulo">
<input type="submit" value="pesquisar" name="perq">
</form>
</body>
</html>
e a pg php:
<?php
//abre conexao (abreconexao.inc nao funcionou coloquei .php)
include "abreconexao.php";
//cria sentença sql
$sql = "select categorias.nomecat, livros.codlivro, livros.titulo, livros.autor, livros.preco ";
$sql = $sql . "from categorias ";
$sql = $sql . "inner join livros ";
$sql = $sql . "on categorias.codcat = livros.codcat ";
$sql = $sql . "where livros.titulo like '%$txtTitulo%' ";
//carrega registros selecionados
$rs = mysql_query($sql, $conexao) or die ("nao conseguiu efetuar consulta");
?>
<b>livros da editora<br><br></b>
<table width="700" border="1">
<?php
while ($linha = mysql_fetch_array($rs))
{
$codlivro = $linha["codlivro"];
$titulo = $linha["titulo"];
$preco = $linha["preco"];
$autor = $linha["autor"];
$nomecat = $linha["nomecat"];
?>
<td valign="top"><?php echo $codlivro; ?></td>
<td valign="top"><?php echo $titulo; ?></td>
<td valign="top"><?php echo $autor; ?></td>
<td valign="top"><?php echo $nomecat; ?></td>
<td valign="top"><?php printf ("%.2f", $preco); ?></td>
</tr>
<?php
}
mysql_free_result($rs);
mysql_close($conexao);
?>
soh que a resposta q obtenho ao pesquisar é:
Notice: Undefined variable: txtTitulo in C:\serieweb\php\cap9lab51.php on line 12
isto é , o php nao consegue achar a variavel que vem na form. alguem tem ideia do que posso fazer pra arrumar?
#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
%>
#172813 Preciso De Uma Luz De Como Fazer Uma Pesquisa
Posted by invictus on 21/08/2003, 17:25 in ASP
<%@ language="vbscript" %>
<!--#include file="../usuarios/adovbs.inc"-->
<%
p_dia = Request.Form("p_dia")
p_mes = Request.Form("p_mes")
set usuariosDB = server.CreateObject("ADODB.CONNECTION")
conStr ="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath ("../../dados/almanaque.mdb")
usuariosDB.Open ConStr
sqlText = "select * From tododiadata Where his_month='"& p_mes &"' and his_day='"& p_dia &"'"
set tddiaset = usuariosDB.Execute(sqlText)
while not tddiaset.EOF
Response.Write tddiaset("his_link")
tddiaset.MoveNext
wend
tddiaset.Close
set tddiaset = Nothing
usuariosDB.close
set usuariosDB = Nothing
%>
mas dá o seguinte erro:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][Driver ODBC para Microsoft Access] Tipo de dados imcompatível na expressão de critério.
alguem dá alguma ideia?
#173261 Preciso De Uma Luz De Como Fazer Uma Pesquisa
Posted by invictus on 22/08/2003, 13:42 in ASP
fala pra ele botar o cod aqui, open source pô hehehe
o que eu preciso é mais simples, ja tenho as combos, uma com todos os dias do mes e outra com todos os meses do ano. Preciso que, ao usuario clicar em determinado dia e mes, o bco de dados ser acionado e retornar com a resposta
#172244 Perguntas E Respostas!
Posted by invictus on 20/08/2003, 17:20 in HTML, CSS e Metodologias
http://www.terra.com...ste_opiniao.htm
é só pedir pra mostrar o codigo fonte pra ver como funciona.
#184188 O Melhor Livro De Php Onde Eu Posso Aprender Muito
Posted by invictus on 09/09/2003, 13:29 in PHP
só não tem mto sobre sql, vc usa um bco de dados ja pronto para construir o site-exercicio.
- Fórum WMO
- → invictus's Content
- Privacy Policy
- Regras ·