Jump to content


invictus's Content

There have been 52 items by invictus (Search limited from 26/04/2023)



Ordernar por                Order  

#177410 Banco De Dados

Posted by invictus on 28/08/2003, 15:09 in ASP

tente fazer assim:

set usuariosDB = server.CreateObject("ADODB.CONNECTION")
conStr ="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../../dados/almanaque.mdb")
usuariosDB.Open ConStr


note que eu criei uma variavel para informar o driver especifico e o endereço onde esta o bco de dados.

o seu esta apenas assim:

Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
Conn.Open dsn


tente fazer algo similar para o seu



#235335 Link Para Pagina Com Iframes Diferentes

Posted by invictus on 21/11/2003, 15:14 in HTML, CSS e Metodologias

Estou com um problema, coloco essa img para ilustrar.

Posted Image

tenho a pagina index com alguns links. Esses links devem abrir a pagina index2 com sua respectiva iframe.

A pagina index2 tem os links para abrir dentro da iframe e estão funcionando OK, mas queria que a index pudesse abrir direto



#237532 Link Para Pagina Com Iframes Diferentes

Posted by invictus on 24/11/2003, 14:13 in HTML, CSS e Metodologias

rapaz, nao entendi umas coisas:

essa parte vai dentro do index 2?

<iframe id="exemplo"></iframe>


sendo assim eu tiro a src? (minha iframe:

<iframe
id="exemplo" 
name =  "conteudo"
height = "266"
width = "563"
frameborder = "0"
src = "entrada.htm"> </iframe>


e esse, vai em q arquivo?

<script language="JavaScript"
  var area =  location.search.slice(1);
  document.getElementById("exemplo").src = area + ".htm";
</script>


desculpe a ignorancia, é que testei aqui de alguns jeitos mas não deu certo



#237556 Link Para Pagina Com Iframes Diferentes

Posted by invictus on 24/11/2003, 14:35 in HTML, CSS e Metodologias

nao está indo, não sei o que esta errado:

index:

<area shape="rect" coords="202,48,231,62" href="index2.htm?perfil">


index2:

<head>
<script language="JavaScript">
  var area =  location.search.slice(1);
  document.getElementById("exemplo").src = area + ".htm";
</script>

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<iframe
id="exemplo" 
name =  "conteudo"
height = "266"
width = "563"
frameborder = "0">
</iframe>


</body>
</html>




#238187 Link Para Pagina Com Iframes Diferentes

Posted by invictus on 25/11/2003, 12:50 in HTML, CSS e Metodologias

funcionou meu amigo, valeu!



#164229 Host Gratuita E Boa?

Posted by invictus on 07/08/2003, 16:15 in ASP

eu ja tentei a brinkster e a websamba, nao achei nenhuma boa, a que eu me dei melhor foi essa:

http://www.1asphost.com/



#172244 Perguntas E Respostas!

Posted by invictus on 20/08/2003, 17:20 in HTML, CSS e Metodologias

tem um jeito melhor, é o que está nesse teste do terra:

http://www.terra.com...ste_opiniao.htm


é só pedir pra mostrar o codigo fonte pra ver como funciona.



#115726 Problemas Na Newsletter

Posted by invictus on 09/06/2003, 14:34 in ASP

já tentei varios codigos prontos e sempre aparece essa msg de erro:

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?



#115757 Problemas Na Newsletter

Posted by invictus on 09/06/2003, 15:13 in ASP

onde que eu dou essa permissão?

obs: no meu PWS funciona normal, mas qdo eu coloco no ar dá essa msg



#117277 Problemas Na Newsletter

Posted by invictus on 11/06/2003, 13:37 in ASP

:) siiiim! valeu!



#116523 Problemas Na Newsletter

Posted by invictus on 10/06/2003, 13:32 in ASP

agora dá essa mgs:

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



#77523 Cursos De Php Em Sp

Posted by invictus on 14/04/2003, 00:58 in PHP

estou querendo entrar em um curso, alguém tem algum pra me indicar fora impacta, senac?



#78070 Cursos De Php Em Sp

Posted by invictus on 15/04/2003, 01:03 in PHP

valeu foxn, se o pessoal souber mais mande ae,



#79053 Cursos De Php Em Sp

Posted by invictus on 17/04/2003, 01:43 in PHP

valeu ao pessoal que respondeu, esse da dominio achei poucas horas mesmo (só 14). esse bit-net parece bom, e o preço tbm.. vi no senac e tá 700 paus por 60 hs!

vou dar uma olhada no script brasil tbm..

mais sugestões eu agradeço



#189103 Problemas No Insert

Posted by invictus on 16/09/2003, 20:58 in PHP

sim eu fiz isso de mudar pra ON e funcionou para o select. mas para o insert ainda persiste um erro , agora ele só apresenta

nao conseguiu executar instrução INSERT


sem dar nem uma dica do que pode ser o preoblema



#185240 Problemas No Insert

Posted by invictus on 11/09/2003, 12:41 in PHP

tenho este cod para inserir:

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



#185274 Problemas No Insert

Posted by invictus on 11/09/2003, 13:32 in PHP

jack: o bco de dados esta todo certo, já consegui listar inclusive

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.



#173261 Preciso De Uma Luz De Como Fazer Uma Pesquisa

Posted by invictus on 22/08/2003, 13:42 in ASP

legal que ele conseguiu mas eu to a fim de aprender mesmo..

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



#184188 O Melhor Livro De Php Onde Eu Posso Aprender Muito

Posted by invictus on 09/09/2003, 13:29 in PHP

eu estou usando o FAÇA UM SITE - PHP, e estou gostando, é bem didatico pra quem ta começando e tem exemplos praticos já que vc faz os exercicios construindo um site.

Posted Image

só não tem mto sobre sql, vc usa um bco de dados ja pronto para construir o site-exercicio.



#172813 Preciso De Uma Luz De Como Fazer Uma Pesquisa

Posted by invictus on 21/08/2003, 17:25 in ASP

estou tentando fazer uma pesquisa desse tipo tambem, eis meu arq para busca:

<%@ 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?



#141591 Fazer Sistema De Consulta Por Combo

Posted by invictus on 10/07/2003, 16:55 in ASP

ae leandro, dá pra vc postar os campos do bco de dados que vc usou e o formulario usado? to com dificuldades em substituir os campos...

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




#117291 Mudanças No Chacal Mail

Posted by invictus on 11/06/2003, 13:54 in ASP

mas vem cá, tem que ter un cabeçalho pro javascript funcionar? tipo:

<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



#112863 Mudanças No Chacal Mail

Posted by invictus on 05/06/2003, 15:03 in ASP

rapaz, nem funcionou..

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



#142378 Fazer Sistema De Consulta Por Combo

Posted by invictus on 11/07/2003, 14:00 in ASP

cade td mundo? preciso saber issooo



#111604 Mudanças No Chacal Mail

Posted by invictus on 03/06/2003, 14:18 in ASP

quero que o arquivo mail.asp, que é onde aparece a frase "obrigado por se cadastrar" apareça numa popup, e não no explorer


alguem sabe os codigos em javascript pra fazer isso?




IPB Skin By Virteq