cyberalexxx
-
Total de itens
2.500 -
Registro em
-
Última visita
Posts postados por cyberalexxx
-
-
Eu tentei usar o isdate e não funcionou!!
if isdate(horaini) = false then
Response.Redirect ("MSG.ASP")
end if
o meu código eu testei e ta funfando, quanto ao seu, mostra mais ai pra poder avaliar.
-
tenta assim:
<% hora="22:00:00" if len(hora) = 7 or len(hora) = 4 then hora="0"&hora end if horasistema=right(time(),8) if isdate(hora) = true then response.write "Hora valida - " & hora & "<BR>" if hora < horasistema then response.write "horario informado menor que o atual - " & horasistema else response.write "horario informado maior que o atual - " & horasistema end if else response.write "Hora invalida - " & hora & "<br>" end if %>
-
entre em http://www.codigolivre.com.br e faça uma busca por suporte, irão aparecer varios scripts prontos.
-
De uma olhada na documentação da microsoft:
http://msdn.microsoft.com/library/default....table___sql.asp
-
Não seria porque na sub que cria o recorset voce usar objRs e na que desconecta você usa objRsTmp???
-
O problema do JS é sempre a falta de segurança!
Pois, um script js pode ser alterado pelo usuario.
é verdade!!
O ideal é usar JS pra ficar "bonitinho" vamos dizer, mas mesmo assim colocar uma validação no script ASP.
-
se você usar js fica legal também !!
Exemplo em JS (I.E.):
<script> function travaspa() { if (event.keyCode==192){ alert("entrada invalida"); event.returnValue = false; } } </script> <input type="text" onkeydown="javascript: travaspa();" </form>
-
Use o Método Gambi:
Uma saida seria uma tabela de marcas, onde a cada alteração voce registrasse o ID do produto e a marca, ficaria mais aou menos assim:
ID MARCA
1 Sabão em pó OMO
2 Marca qualquer
1 Lava Roupas OMO
Sendo assim voce faria a busca nesta tabela e pegaria o ID e pelo ID voce saberia todas as marcas que este produto já teve.
Obs: Método gambi = gambiarra
-
alguém tem alguma idéia de como eu posos fazer para não listar um campo que tenho inserido um dado ?
SELECT * FROM tabela where campo <> 'dadoinserido'
-
O FSO vem com o Windows XP Pro, mais não esta registrado no IIS (pelo menos aconteceu comigo), para registrar:
execute no windows
regsvr32 scrrun.dll
-
Isso foi feito através de uma ferramenta para geração de menu DHTML, o ezmenu já usei ele uma vez, os dados estão realmente no ezdata.js
-
pelo jeito é isso mesmo que o Alex0612 falou, o campo não é numérico, quando voce ordena um campo texto primeiro ele mostra tudo q começa com 0 depois com 1 e por ai vai, ou seja o campo 1.000.000 aparece antes do 2.
-
Para testar as consultas (mais avançadas), eu faço a simulação através do MySql Query Browser, ajuda bastante, só passo para o script quando a consulta estiver do jeito q eu quero.
-
Pressupondo que voce tenha exportado o banco e esteja usando um campo do tipo TINYINT no mysql, voce deve fazer a consulta assim:
SELECT * FROM justificativa WHERE Conferida=0 AND Central='Apae Jaú'
No Mysql é usado 0 para desmarcado e 1 para marcado.
-
uma conexão minha de exemplo:
SET conexao=Server.CreateObject("adodb.connection") conexao.Open "Driver={mySQL}; Server=localhost; Port=3306; Option=0; Socket=; Stmt=; Database=dados; Uid=xxxx; Pwd=xxxxxx;" SQL = "select frase from textos order by rand() limit 0,1" SET RS = Server.CreateObject("ADODB.Recordset") RS.Open SQL,conexao,3
-
set conexao=server.createobject("adodb.connection") caminho="DBQ=" & server.mappath("banco.mdb") conexao.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & caminho SQL = "select * from tabela" SET RS = Server.CreateObject("ADODB.Recordset") RS.Open SQL,conexao,3 response.write rs.recordcount
-
-
Num querendo encomodar mais enmcomodando.
no php,
ucwords (string), converte os primeiros caracteres de strings em maiúsculo.
nl2br (string) - Exibe o texto do bd com a formatação.
e no asp, quais seriam?
Quanto ao ucwords() no asp não existe uma função correspondente, voce tem que fazer na marra, pois ele só converte toda a string, entaum teria q fazer assim:
response.write Ucase(left(string,1))&lcase(mid(string,2,len(string)-1))
-
tenta deixar seu código assim:
<!--#include file="../../global/funcoes.asp" --> <table width=100%><tr><td> <center><b>Clike sobre o nome do cantor ou banda abaixo para ver suas musicas</b></center><p> <% strSQl = "SELECT * FROM cifras ORDER BY autor" Set Rs_cifras = server.createobject("ADODB.Recordset") Rs_cifras.Open strSQl,Conn , 3, 3 total= Rs_cifras.recordcount linha = "4" ' Numero de imagens por linha %> <table width="590" border="1" align="center" topmargin=50 cellpadding="0" cellspacing="0"> <tr> <% 'response.write total x=0 Do While not Rs_cifras.EOF x=x+1 %> <td valign=top width=25%><center><b><i><a href="cifras_conteudo_con_autor.asp?autor=<%=Rs_cifras("autor")%>"><%=Rs_cifras("autor")%></a></i></b></center></td> <% if x mod 4 = 0 then response.write "</tr><tr>" end if Rs_cifras.MoveNext Loop %> </tr> </table> </td> </tr> </table>
-
É.
Tipo
imagem1 imagem2 imagem3 imagem4
imagem5 imagem6 imagem7 imagem8
imagem9 imagem8 imagem9 ...etc..
vou te passar a lógica:
response.write "<table><tr>" x=0 Do while not RecordSet.Eof x=x+1 response.write "<td>" response.write Recordset("imagem") response.write "</td>" if x mod 4 = 0 then response.write "</tr><tr>" end if RecordSet.MoveNext loop response.write "<tr></table>"
-
olha aki um exemplo que exibe 40 registros por pagina com 4 colunas por linha:
<!-- #include file="../include/top.asp" --> <% pagina = Request.QueryString("p") if pagina = "" then pagina = 1 end if 'Seta a variavel pagina como a página em questão na paginação registros = 40 'Seta o número de registros por pagina set RS = Server.Createobject("AdoDB.RecordSet") set RS.ActiveConnection = conn RS.cursortype = 3 RS.pagesize = registros StrSQL = "select * from Items where tipo=""calca""" RS.Open StrSQL if RS.EOF then %><font face="Arial" size="2">Sua pesquisa não retornou nenhum resultado</font><% else RS.absolutepage = pagina if RS.EOF then %><font face="Arial" size="2">Sua pesquisa não retornou nenhum resultado</font><% fim = -1 end if xx = 0%> <table width="776" height="55"> <tr> <% while NOT RS.EOF AND xx < RS.pagesize xx = xx + 1 %> <td height="86" width="384"> <form method=get action=DETALHES.ASP> <table width="26%" height="86" border="0"> <tr> <td width="30%" height="82" valign="middle"> <div align="center"><img src="http://www.dynamus.economicojp.com/produtos/shop/uploads/<%=rs("ImageDesc")%>" width="75" height="130" border="0"></div> </td> <td width="70%" height="82"> <table width="195" border="1" align="left" cellpadding="2" cellspacing="0" bordercolor="#FFFFFF"> <tr> <td bgcolor="#FFFFFF" height="10" width="187"><span class="style16"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=rs("ItemName")%></font></span></td> </tr> <tr> <td bgcolor="#ffffff" height="18" width="187"> <p align="LEFT" class="style17"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><span class="style20"><strong><span class="style19"> <input type="HIDDEN" name="NOME" value="<%=rs("ItemName")%>"> <input type="HIDDEN" name="desc" value="<%=rs("Itemdesc")%>"> <input type="HIDDEN" name="image" value="<%=rs("ImageDesc")%>"> <input type="HIDDEN" name="color" value="<%=rs("cores")%>"> <input type="HIDDEN" name="tamam" value="<%=rs("tamanho")%>"> <input type="HIDDEN" name="refe" value="<%=rs("ref")%>"> <input type="submit" name="Submit" value="Ver Detalhes"> </span></strong></span> </font> </td> </tr> </table> </td> </tr> </table> </form> </td> <% if xx mod 4 = 0 then%> </tr></table><table width="776" height="55"> <tr> <%end if%> rs.movenext rs.cachesize = 1 wend %> </table> <%end if if fim = "" then anterior = pagina - 1 proxima = pagina + 1 if anterior <> 0 then %><% end if RS.Close Conn.Close %><a href="<%=request.servervariables("script_name")%>?p=<%=anterior%>">Página Anterior</a> - <% end if %><a href="<%=request.servervariables("script_name")%>?p=<%=proxima%>">Próxima Página</a>
-
faça uma busca no forum por paginação, que você ira encontrar bastante coisa a respeito.
-
No servidor onde eu hospedado, quando eu crio um sql server, eles me dão um link para acessar o servidor... é tipo o programa do SQL Server no PC, só que é pela internet... É igual Mysql..
Interessante, nunca hospedei nada com sql server, só mysql.
isso que voce esta falando é uma ferramente front-end tipo o phpmyadmin??
-
acho q é isso, vai montando a string de conexão pra ver se da algum erro, ou se conecte usando DSN.
Pegar Apenas O Valor Selecionado
em ASP
Postado
Não entendi o q você quer!! pelo que vi o código esta funcioando.