
Clauido José
Membros-
Total de itens
457 -
Registro em
-
Última visita
Tudo que Clauido José postou
-
Desculpe mas qual o melhor pra usar aqui o sum ou count?
-
Descupe me espreci mal não o total mas sim o total de registro tipo se tiver 20 os tem que aparecer o Os = 20 e a empresa tipo assim fica o for Empresa Os Status 18 - Lutec 20 20 19 - Lider 15 15 entendeu?
-
Mas ou memos isso eu chamo uma tabela usando select ok bom ele me traz os dados desta tabela e abre um form dentro dum loop que executa até o final do arquivo, então dentro do form que ta dentro do loop eu coloquei um select com dados de outra tabela para o usario selecionar o tecnico, quando eu seleciono o primeiro como o select ta dentro do loop ele seleciona os outros select criado pelo loop. Bom o que eu queria saber é se tem como criar um array como o select pra dexiar selecionado somente o select que usuario selecionar entende.
-
Não consegui resolver ainda eu criei um loop e dentro deste loop while not rs.eof bom dentro dele eu coloquei um select que traz os tecnicos para o usuario selecionar bom eu quero o seguinte quando o usuario selecionar o tecnio ele fique selecionado do jeito que eu fiz ele ta selecinando todos os select do loop. Vou mostrar o codigo para você verem ok. Obrigado: do while Not rsRota.EOF strSql = "Select * from tabCliente where NoOs = '" & rsRota("NoOs") & "' order by NoOs" set rsCliente = Conexao.Execute(strSql) if rsCliente.eof then strCep = "" else strCep = rsCliente("Cep") strBairro = left(rsCliente("Bairro"),22) strTResid = left(rsCliente("TipoResidencia"),8) strPeriodo= rsRota("Periodo") end if strSql = "Select * from tabTipoOs where idTipoOs=" & Cint(rsRota("idTipoOs")) set rsTipoOs = Conexao.Execute(strSql) if rsTipoOs.Eof then strTipoOs = "" else strTipoOs = Left(rsTipoOs("Descricao"),25) strSql = "Select * from tabEstados where IdEstado = " & rsCliente("idEstado") set rsEstado = Conexao.Execute(strSql) if rsEstado.Eof then strEstado = "" else strEstado = rsEstado("Estado") strSql = "Select * from tabCidades where idCidade = " & rsCliente("idCidade") set rsCidade = Conexao.Execute(StrSql) if rsCidade.Eof then strCidade = "" else strCidade = rsCidade("Cidade") strIdServico = rsRota("idServico") if strNoOs <> rsRota("NoOs") and strPrim = 0 then i=i+1 if Bg="#FFFFFF" then Bg="#5082B4" else Bg="#FFFFFF" end if NoOs =rsRota("NoOs") %> <tr bgcolor="<%=Bg%>"> <td width="64" height="10" class="SubTitulo"><%=NoOs%></td> <td width="73" align="left" class="SubTitulo"><%=strCep%></td> <td width="60" align="center" class="SubTitulo"><%=strIdServico%></td> <td width="64" align="center" class="SubTitulo"><%=strTipoOs%></td> <td width="55" align="center" class="SubTitulo"><%=strPeriodo%></td> <td width="91" align="center" class="SubTitulo"><%=strBairro%></td> <td width="55" align="center" class="SubTitulo"><%=strTResid%></td> <td width="48" align="center" class="SubTitulo"><%=rsRota("Status")%></td> <td width="60" align="center" class="SubTitulo"><%=rsRota("QtdPontos")%></td> <td width="80" align="center" class="SubTitulo"> <select name="seTecnico&i" style="width:80" class="campo" id="seTecnico" onChange="MM_jumpMenu('this',this,0)"> <option>Selecione</option> <% strSql = "Select * from tabTecnicos order by Tecnico " set rsTecnico = Conexao.Execute(strSql) if not rsTecnico.Eof then while not rsTecnico.Eof %> <option value="atribuirotageral.asp?atc=New&NoOs=<%=rsRota("NoOs")%>&idTecnico=<%=rsTecnico("idTecnico")%>"<%if Request.Form("seTecnico") = rsTecnico("Tecnico") or cint(Request.QueryString("idTecnico")) = rsTecnico("idTecnico") then%> selected="selected"<%end if%>><%=rsTecnico("Tecnico")%></option> <%rsTecnico.MoveNext wEnd end if %> </select></td> </tr> <% TotalOs = 0 TotalAB = 0 TotalAC = 0 TotalCA = 0 TotalNF = 0 TotalRP = 0 strNoOS = rsRota("NoOs") strPeriodo=rsRota("periodo") strInfoAdc=rsRota("InfoAdcionais") strIdEmpresa = rsRota("idEmpresa") strDanos = rsRota("Danos") strSql = "Select * from tabEmpresa where Empresa = '" & strIdEmpresa & "'" set rsEmpresa = Conexao.Execute(strSql) if rsEmpresa.eof then strEmpresa = "não Consta na tabela de empresa" else strEmpresa = rsEmpresa("Responsavel") end if TotalOs = TotalOs + 1 if rsRota("Status") = "AB" then TotalAB = TotalAb + 1 if rsRota("Status") = "AC" then TotalAC = TotalAC + 1 if rsRota("Status") = "CA" then TotalCA = TotalCA + 1 if rsRota("Status") = "NF" then TotalNF = TotalNF + 1 if rsRota("Status") = "RP" then TotalRP = TotalRP + 1 rsRota.MoveNext i = i + 1 loop
-
OK entendi. Bom com relação a querys é seguinte tenho que abrir a tabela de modo que ela traga a empresa com o total da Os e total do servico o total status = 'Ab' já estou postando sobre os topicos.
-
resolvido pelo InfoCideira
-
Pessoal gostaria de agradecer pela força que você estão me dando não quero que você faça o sistema pra mim é bom a gente se virar em vez em quando. Olha não manjo muinto de comando sql sei o basico mas to com uma duvida com a opção Count, é o seguinte: Preciso criar uma consulta com o Count mas é seguinite ele tem que trazer o total da empresa e total das Os executadas. Bom se eu colocar a empresa ele traz o total certinho mas quando eu coloco o total da Os ele traz registro por registro não traz o grupo todo o que devo fazer ai vai o codigo. Se você poderem me ajudar eu vou agradecer des de já: SELECT Count(tabDth.idEmpresa) AS TotalEmp, tabEmpresa.Responsavel, Count(tabDth.NoOs) AS Total, tabDth.Status, tabDth.HoraInicio, tabDth.DatCompromisso FROM tabEmpresa INNER JOIN tabDth ON tabEmpresa.Empresa = tabDth.idEmpresa GROUP BY tabEmpresa.Responsavel, tabDth.Status, tabDth.HoraInicio, tabDth.DatCompromisso, tabDth.idEmpresa, tabDth.NoOs HAVING (((tabDth.DatCompromisso)=[Data])) ORDER BY Count(tabDth.idEmpresa);
-
Consegui resolver obrigado estou quebrando a cabeça com uns negocio aqui mas estou indo beleza valeu mais uma vez. Cara com relação a esta duvida pensei ter consegui mas não consegui eu coloquei da seguinte maneira o select no loop mas le não ta deixando selecionado o tenico. <Select name="seEmpresa" style="width:50" onchange="MM_jumpMenu('this',this,0)"> <% strSql = "Select * from tabEmpresa " set rsEmpresa = Conexao.Execute(strSql) %> <option>Selecione</option> <%s =0 while not rsEmpresa.Eof %> <!--<option value="atribuirotaGeral.asp?atc=New&idEmpresa=<%=rsEmpresa("Empresa")%>&NoOs=<%=rsRota("NoOs")%>" </option>--> <option value="atribuirotaGeral.asp"<%if Request.Form("seEmpresa") = rsEmpresa("Empresa") then%>Selected<%end if%> ><%=rsEmpresa("Empresa")%></option> <% s = s +1 rsEmpresa.movenext wEnd %>
-
certo é isso mesmo pelo word direto não da pra fazer iss né?
-
como apagar esse tópico
-
Bom é seguinte o tópico com o select que eu coloquei não era igual ao outro do loop com sub total porque é outra tela. Bom é seguinte eu crei um loop e coloquei um select dentro deste loop para que o usuario possa excolher o tecnico que vai executar o serviço, ele ta fazendo certo mas na hora que eu celeciono o select com o tecnico ele ta colocando nos outros select criado pelo loop o tecnico selecionado. Bom duvida tem como criar um array com esse select ou existe alguma maneira mais facil de fazer isso. Se precisar eu posto o codigo.Obrigado e desculpe mais uma vez.
-
bom os campos são o seguinte idEmpresa,idTecnico,idServico,NoOs,DatCompromisso,Status,horaInicio sendo que tenho que usar a clausula where com idempresa e datcompromisso que é data do sistema. Toda vez que o idservico for diferente tem que aparecer o Total do servico do tecnico.
-
do while Not rsRota.EOF strSql = "Select * from tabCliente where NoOs = '" & rsRota("NoOs") & "' order by NoOs" set rsCliente = Conexao.Execute(strSql) if rsCliente.eof then strCep = "" else strCep = rsCliente("Cep") strBairro = left(rsCliente("Bairro"),20) strTResid = left(rsCliente("TipoResidencia"),20) strPeriodo= rsRota("Periodo") end if strSql = "Select * from tabTipoOs where idTipoOs=" & Cint(rsRota("idTipoOs")) set rsTipoOs = Conexao.Execute(strSql) if rsTipoOs.Eof then strTipoOs = "" else strTipoOs = Left(rsTipoOs("Descricao"),20) strSql = "Select * from tabEstados where IdEstado = " & rsCliente("idEstado") set rsEstado = Conexao.Execute(strSql) if rsEstado.Eof then strEstado = "" else strEstado = rsEstado("Estado") strSql = "Select * from tabCidades where idCidade = " & rsCliente("idCidade") set rsCidade = Conexao.Execute(StrSql) if rsCidade.Eof then strCidade = "" else strCidade = rsCidade("Cidade") strIdServico = rsRota("idServico") if strNoOs <> rsRota("NoOs") and strPrim = 0 then i=i+1 if Bg="#FFFFFF" then Bg="#5082B4" else Bg="#FFFFFF" end if NoOs =rsRota("NoOs") %> <tr bgcolor="<%=Bg%>"> <td width="9%" height="10" class="SubTitulo"><%=NoOs%></td> <td width="11%" align="left" class="SubTitulo"><%=strCep%></td> <td width="7%" align="center" class="SubTitulo"><%=strIdServico%></td> <td width="16%" align="center" class="SubTitulo"><%=strTipoOs%></td> <td width="10%" align="center" class="SubTitulo"><%=strPeriodo%></td> <td width="15%" align="center" class="SubTitulo"><%=strBairro%></td> <td width="9%" align="center" class="SubTitulo"><%=strTResid%></td> <td width="11%" align="center" class="SubTitulo"><%=rsRota("DatCompromisso")%></td> <td width="12%" align="center" class="SubTitulo"> <select name="mnuTecnico" style="width:80" class="campo" id="mnuEmpresa" onChange="MM_jumpMenu('this',this,0)"> <option>Selecione</option> <% strSql = "Select * from tabTecnicos order by Tecnico " set rsTecnico = Conexao.Execute(strSql) if not rsTecnico.Eof then while not rsTecnico.Eof %> <option value="atribuidanostecnicos.asp?atc=New&NoOs=<%=rsRota("NoOs")%>&idtecnico=<%=rsTecnico("idTecnico")%>"<%if Request.QueryString("idTecnico") = rsTecnico("idTecnico") then%><%if Request.Form("mnuTecnico") = rsTecnico("Tecnico") then%>selected<%end if%><%end if%>><%=rsTecnico("Tecnico")%></option> <% rsTecnico.MoveNext wEnd end if %> </select></td> </tr> <% TotalOs = 0 TotalAB = 0 TotalAC = 0 TotalCA = 0 TotalNF = 0 TotalRP = 0 strNoOS = rsRota("NoOs") strPeriodo=rsRota("periodo") strInfoAdc=rsRota("InfoAdcionais") strIdEmpresa = rsRota("idEmpresa") strDanos = rsRota("Danos") strSql = "Select * from tabEmpresa where Empresa = '" & strIdEmpresa & "'" set rsEmpresa = Conexao.Execute(strSql) if rsEmpresa.eof then strEmpresa = "não Consta na tabela de empresa" else strEmpresa = rsEmpresa("Responsavel") end if TotalOs = TotalOs + 1 if rsRota("Status") = "AB" then TotalAB = TotalAb + 1 if rsRota("Status") = "AC" then TotalAC = TotalAC + 1 if rsRota("Status") = "CA" then TotalCA = TotalCA + 1 if rsRota("Status") = "NF" then TotalNF = TotalNF + 1 if rsRota("Status") = "RP" then TotalRP = TotalRP + 1 rsRota.MoveNext loop
-
Ola estou aqui mais uma vez preciso de suas ajuda, bom é seguinte tem como criar um select num array porque é o seguinte criei um loop e coloquei um select trazendo o a empresa para o usuario selecionar bom e carrega certo mas quando seleciono ele carrega os outros select com o valor do que eu alteriei entenderam.
-
Ola pessoal estou aqui de novo tenho uma duvida que quero que você me ajudem estou fazendo um sistema como disse e tenho que fazer uma pagina em asp que aparece um sub total toda vez que o id do serviço for difrente veja como estou fazendo mas não ta dando certo alguém pode me ajudar? <tr bgcolor="<%=Bg%>"> <td width="30%" align="center" class="SubTitulo">Tecnico</td> <td width="10%" align="center" class="SubTitulo"> Seriço</td> <td width="10%" align="center" class="SubTitulo">Total</td> <td width="5%" align="center" class="SubTitulo">AB</td> <td width="5%" align="center" class="SubTitulo">AC</td> <td width="5%" align="center" class="SubTitulo">CA</td> <td width="5%" align="center" class="SubTitulo">NF</td> <td width="5%" align="center" class="SubTitulo">RP</td> <td width="10%" align="center" class="SubTitulo">H.Incío</td> <td width="5%" align="center" class="SubTitulo"> </td> </tr> <tr> <td colspan="10" align="left" valign="top"><div><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="Tabela1"> <% if rsRota.RecordCount > 0 then if not rsRota.Eof then strPrim = 0 TotalOs = 0 TotalAB = 0 TotalAC = 0 TotalCA = 0 TotalNF = 0 TotalRP = 0 strSql = "Select * from tabTecnicos where idTecnico = " & rsRota("idTecnico") & " order by Tecnico" set rsTecnicos = Conexao.Execute(strSql) if rsTecnicos.eof then strTecnicos = "não Consta" else strTecnicos = rsTecnicos("Tecnico") end if strIdServico = rsRota("idServico") strIdTecnico = rsRota("idTecnico") while Not rsRota.EOF TotalOs = TotalOs + 1 if rsRota("Status") = "AB" then TotalAB = TotalAb + 1 if rsRota("Status") = "AC" then TotalAC = TotalAC + 1 if rsRota("Status") = "CA" then TotalCA = TotalCA + 1 if rsRota("Status") = "NF" then TotalNF = TotalNF + 1 if rsRota("Status") = "RP" then TotalRP = TotalRP + 1 if strIdServico <> rsRota("idServico") and strPrim = 0 then strPrim = 0 rsRota.MoveNext else strSql = "Select * from tabTecnicos where idTecnico = " & rsRoTa("idTecnico") & " order by Tecnico" 'Response.Write(strSql) 'Response.End() set rsTecnicos = Conexao.Execute(strSql) if rsTecnicos.eof then strTecnicos = "não Consta" else strTecnicos = rsTecnicos("Tecnico") i=i+1 if Bg="#FFFFFF" then Bg="#5082B4" else Bg="#FFFFFF" end if strIdServico= rsRota("idServico") strIdTecnicos = rsRota("idTecnico") %> <tr bgcolor="<%=Bg%>"> <td width="30%" height="10" align="left" class="SubTitulo"><%=strTecnicos%></td> <td width="10%" align="center" class="SubTitulo"><%=strIdServico%></td> <td width="10%" align="center" class="SubTitulo"><%=TotalOs%></td> <td width="5%" align="center" class="SubTitulo"><%=TotalAB%></td> <td width="5%" align="center" class="SubTitulo"><%=TotalAC%></td> <td width="5%" align="center" class="SubTitulo"><%=TotalCA%></td> <td width="5%" align="center" class="SubTitulo"><%=TotalNF%></td> <td width="5%" align="center" class="SubTitulo"><%=TotalRP%></td> <td width="10%" align="center" class="SubTitulo"> </td> <td width="5%" align="center" class="SubTitulo"><img src="imagem/icon_mini_search.gif" name="img" width="15" height="13" style="cursor:hand" onClick="fim('<%=strIdEmpresa%>','<%=strIdServico%>');"></td> </tr> <% TotalOs = 0 TotalAB = 0 TotalAC = 0 TotalCA = 0 TotalNF = 0 TotalRP = 0 strPrim = 1 rsRota.MoveNext end if wEnd end if end if end if %>
-
fiz da seguinte maneira não estou entendendo desculpe minha iguinorancia <select name="mnuTecnico" style="width:80" class="campo" id="mnuEmpresa" onChange="MM_jumpMenu('this',this,0)"> <%if Request.Form("mnuTecnico") = Request.Form("mnuTecnico") then id = "selected" else id = false end if%> <option>Selecione</option> <% strSql = "Select * from tabTecnicos order by Tecnico " set rsTecnico = Conexao.Execute(strSql) if not rsTecnico.Eof then while not rsTecnico.Eof %> <option value="atribuirotageral.asp?atc=New&NoOs=<%=rsRota("NoOs")%>&idTecnico=<%=rsTecnico("idTecnico")%>"<%=id%>><%=rsTecnico("Tecnico")%></option> <%rsTecnico.MoveNext wEnd end if %> </select></td>
-
cara fiz desse jeito mas o que ele faz é seguinte traz os ultimo tecnico em todas os select e quando mudo ele continua mudando para o ultimo
-
Não é bem isso que eu quero eu quero importar isto via codigo asp. Desculpe acho que não me exprecei bem obrigado mesmo assim
-
Ola pessoal tem algum geito de importar aquivos do word para uma base de dados acces usando asp sei que o excel da já fiz isto mas preciso tambêm importar arquivos word existe alguma maneira?
-
Ola pessoal tenho uma duvida que queria a ajuda de você ok. Vou colocar um codigo que fiz de um sistema bom ele faz o seguinte quando abro a base de dados access o sistema traz uma tela com informação de rota de tecnico. Bom é o seguinte coloquei num loop um <select> para que o usuario mude o tecnico e atualize na tabela, o que eu quero é o seguinte quando ele der o jumpmenu ele volte com o tecnico selecionado assim sabremos em qual paramos entendem? A via o codigo: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Atribuicao de rotas</title> <link href="css/estilos.css" rel="stylesheet" type="text/css" /> <script type="text/JavaScript"> <!-- <!-- //--> function AbrirJanela(janela,Pos1,Pos2,Pos3,Pos4) { window.open(janela,"SESSAO","left="+Pos1+",top="+Pos2+",width="+Pos3+",height="+Pos4) } function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } </script> <script language="javascript" src="jsp/ajax.js"></script> </head> <body> <!--#include file="strCon.asp"--> <% dim Conexao, strSql, strData call abreConexao() if Request.QueryString("atc") = "New" then strNoOs = Request.QueryString("NoOs") stridTecnico = Request.QueryString("idTecnico") data = date dia = datepart ("d", data) mes = datepart ("m", data) ano = datepart ("yyyy", data) strdata = (mes&"/"&dia&"/"&ano) strSql = "Select * from tabDTH where DatCompromisso = #" & strData & "# " strSql = strSql & " and NoOs = " & Request.QueryString("NoOs") & " order by idEmpresa" set rsRota = Conexao.Execute(StrSql) if not rsRota.Eof then strSql = "Update tabDth Set " strSql = StrSql & " idTecnico=" & strIdTecnico strSql = strSql & " where idDth=" & rsRota("idDth") Conexao.Execute(StrSql) end if end if data = date dia = datepart ("d", data) mes = datepart ("m", data) ano = datepart ("yyyy", data) strdata = (mes&"/"&dia&"/"&ano) strSql = "Select * from tabDTH where DatCompromisso = #" & strData & "# order by idEmpresa" set rsRota = Conexao.Execute(StrSql) status = "Rota Geral " %> <form action="atribuidanosmateriais.asp?atc=New&NoOs=<%=rsRota("NoOs")%>&idEmpresa=<%=rsRota("idEmpresa")%>&idServico=<%=rsRota("idServico")%>" method="post" name="frmDanos" id="frmDanos"> <table width="700" height="450" border="0" align="center" cellpadding="0" cellspacing="0" class="Tabela"> <tr> <td width="20" class="aviso"> </td> <td width="678" class="aviso"> </td> </tr> <tr> <td> </td> <td class="SubTitulo">Ola<%=Session("Usuario")%> você está em <strong>Intranet DTH 25</strong> <strong>» Atribuição » <%=status%></strong></td> </tr> <tr> <td> </td> <td class="Texto"> </td> </tr> <tr> <td height="5%"> </td> <td class="Titulo"><%=Session("Erros")%></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td height="370" colspan="2" valign="top"><table width="700" border="0" align="center" cellpadding="0" cellspacing="1" class="Tabela1"> <% Bg="#FFFFFF" %> <tr bgcolor="<%=Bg%>"> <td width="70" align="center" class="SubTitulo">No. Os</td> <td width="78" align="center" class="SubTitulo">CEP</td> <td width="55" align="center" class="SubTitulo">Serviço</td> <td width="70" align="center" class="SubTitulo">Tipo Os </td> <td width="55" align="center" class="SubTitulo">Periodo</td> <td width="90" align="center" class="SubTitulo"><p>BAIRRO</p> </td> <td width="60" align="center" class="SubTitulo">T. RES. </td> <td width="50" align="center" class="SubTitulo">Status</td> <td width="50" align="center" class="SubTitulo">Pontos</td> <td width="100" align="center" class="SubTitulo">Tecnicos</td> </tr> <tr> <td colspan="11" valign="top"><div> <table width="99%" border="0" align="left" cellpadding="1" cellspacing="1" class="Tabela1" style="margin-left:0"> <% if not rsRota.Eof then TotalOs = 0 TotalAB = 0 TotalAC = 0 TotalCA = 0 TotalNF = 0 TotalRP = 0 strSql = "Select * from tabEmpresa where Empresa = '" & rsRota("idEmpresa") & "'" 'R'esponse.Write(strsql) 'response.End() strIdEmpresa = rsRota("idEmpresa") strNoOS = rsRota("NoOs") strPrim = 0 TotalOs = 0 TotalAB = 0 TotalAC = 0 TotalCA = 0 TotalNF = 0 TotalRP = 0 strSql = "Select * from tabEmpresa where Empresa = '" & strIdEmpresa & "'" set rsEmpresa = Conexao.Execute(strSql) if rsEmpresa.eof then strEmpresa = "não Consta na tabela de empresa" else strEmpresa = rsEmpresa("Responsavel") do while Not rsRota.EOF strSql = "Select * from tabCliente where NoOs = '" & rsRota("NoOs") & "' order by NoOs" set rsCliente = Conexao.Execute(strSql) if rsCliente.eof then strCep = "" else strCep = rsCliente("Cep") strBairro = left(rsCliente("Bairro"),22) strTResid = left(rsCliente("TipoResidencia"),8) strPeriodo= rsRota("Periodo") end if strSql = "Select * from tabTipoOs where idTipoOs=" & Cint(rsRota("idTipoOs")) set rsTipoOs = Conexao.Execute(strSql) if rsTipoOs.Eof then strTipoOs = "" else strTipoOs = Left(rsTipoOs("Descricao"),25) strSql = "Select * from tabEstados where IdEstado = " & rsCliente("idEstado") set rsEstado = Conexao.Execute(strSql) if rsEstado.Eof then strEstado = "" else strEstado = rsEstado("Estado") strSql = "Select * from tabCidades where idCidade = " & rsCliente("idCidade") set rsCidade = Conexao.Execute(StrSql) if rsCidade.Eof then strCidade = "" else strCidade = rsCidade("Cidade") strIdServico = rsRota("idServico") if strNoOs <> rsRota("NoOs") and strPrim = 0 then i=i+1 if Bg="#FFFFFF" then Bg="#5082B4" else Bg="#FFFFFF" end if NoOs =rsRota("NoOs") %> <tr bgcolor="<%=Bg%>"> <td width="64" height="10" class="SubTitulo"><%=NoOs%></td> <td width="73" align="left" class="SubTitulo"><%=strCep%></td> <td width="60" align="center" class="SubTitulo"><%=strIdServico%></td> <td width="64" align="center" class="SubTitulo"><%=strTipoOs%></td> <td width="55" align="center" class="SubTitulo"><%=strPeriodo%></td> <td width="91" align="center" class="SubTitulo"><%=strBairro%></td> <td width="55" align="center" class="SubTitulo"><%=strTResid%></td> <td width="48" align="center" class="SubTitulo"><%=rsRota("Status")%></td> <td width="60" align="center" class="SubTitulo"><%=rsRota("QtdPontos")%></td> <td width="80" align="center" class="SubTitulo"> <select name="mnuTecnico" style="width:80" class="campo" id="mnuEmpresa" onChange="MM_jumpMenu('this',this,0)"> <option>Selecione</option> <% strSql = "Select * from tabTecnicos order by Tecnico " set rsTecnico = Conexao.Execute(strSql) if not rsTecnico.Eof then while not rsTecnico.Eof %> <option value="atribuidanostecnicos.asp?atc=New&NoOs=<%=rsRota("NoOs")%>&idtecnico=<%=rsTecnico("idTecnico")%>"<%if Request.QueryString("idTecnico") = rsTecnico("idTecnico") then%><%if Request.Form("mnuTecnico") = rsTecnico("Tecnico") then%>selected<%end if%><%end if%>><%=rsTecnico("Tecnico")%></option> <% rsTecnico.MoveNext wEnd end if %> </select></td> </tr> <% TotalOs = 0 TotalAB = 0 TotalAC = 0 TotalCA = 0 TotalNF = 0 TotalRP = 0 strNoOS = rsRota("NoOs") strPeriodo=rsRota("periodo") strInfoAdc=rsRota("InfoAdcionais") strIdEmpresa = rsRota("idEmpresa") strDanos = rsRota("Danos") strSql = "Select * from tabEmpresa where Empresa = '" & strIdEmpresa & "'" set rsEmpresa = Conexao.Execute(strSql) if rsEmpresa.eof then strEmpresa = "não Consta na tabela de empresa" else strEmpresa = rsEmpresa("Responsavel") end if TotalOs = TotalOs + 1 if rsRota("Status") = "AB" then TotalAB = TotalAb + 1 if rsRota("Status") = "AC" then TotalAC = TotalAC + 1 if rsRota("Status") = "CA" then TotalCA = TotalCA + 1 if rsRota("Status") = "NF" then TotalNF = TotalNF + 1 if rsRota("Status") = "RP" then TotalRP = TotalRP + 1 rsRota.MoveNext loop strSql = "Select * from tabEmpresa where Empresa = '" & strIdEmpresa & "'" set rsEmpresa = Conexao.Execute(strSql) if rsEmpresa.eof then strEmpresa = "não Consta na tabela de empresa" else strEmpresa = rsEmpresa("Responsavel") i=i+1 if Bg="#FFFFFF" then Bg="#5082B4" else Bg="#FFFFFF" end if %> <% end if %> </table> </div></td> </tr> </table></td> </tr> <tr> <td colspan="2" valign="top"> </td> </tr> </table> </form> </body> </html> <% call fechaConexao() set conexao = nothing set rsRota = nothing set empresa = nothing %>
-
(Resolvido) Criando função
pergunta respondeu ao Clauido José de Clauido José em Ajax, JavaScript, XML, DOM
Resolvi era isso mesmo coloquei o nome errado eta. coisa de iniciante. rsrsrsr -
Ola pessoal criei uma função em java script mas ta dando erro alguém pode me ajudar. A função é o seguinte: <script> function fim(id) { document.frmProd.method="POST"; document.frmProd.action="gerarota.asp?act=upd&id=" + idServico document.frmProd.submit(); } </script> para chamar essa função eu chamo assim: <img src="imagem/icon_mini_search.gif" name="img" width="15" height="13" style="cursor:hand" onClick="fim(<%=strIdServico%>);"> ele traz o seguinte erro: LINHA: 106 CARACTERE:1 ERRO: 'INPR' não ESTA DEFINIDO CÓDIGO: 0 BOM O INPR É O CODIGO DO ID DO SERVIÇO alguém PODE ME AJUDAR?
-
Ufa deu certo até que efim valeu mais uma vez desculpe não quiz quebrar as regras do tópico.
-
Bom pessoal postei um tópico sobre o comando select aqui que não funcionava bom descobri o erro a formatação da data coloquei assim '12/11/2008' , exemplo 'mm/dd/yyyy' bom troxe os meus dados bom verifiquei no painel de controle ele esta configurado certo 'dd/mm/yyyy' tentei fazer da seguinte maneira. strDia = day(Date) strMes = month(Date) strAno = year(Date) strData = strMes & "\" & strDia & "\" & strAno campos = "NoOs,DatCompromisso,DatSolicitada,idEmpresa,idTecnico,Status,HoraInicio,Danos" strSql = "Select * from tabDTH where DatCompromisso = #" & strData & "# order by IdEmpresa, DatCompromisso ASC" RESPONSE.Write(STRSQL1 & "<Br>" & STRSQL) 'RESPONSE.END() set rsRota = Conexao.Execute(strSql) Ele me da o seguinte erro agora. [Microsoft][Driver ODBC para Microsoft Access] Erro de sintaxe na data na expressão de consulta 'DatCompromisso = #12\11\2008#'. se eu informar a data em vez de pegar a data do sistema ele traz o dado correto como resolver isso? :unsure:
-
Fiz da seguinte maneira perceba a diferença. <!--#include file="strCon.asp"--> <% dim Conexao, strSql, strData call abreConexao() campos = "NoOs,DatCompromisso,DatSolicitada,idEmpresa,idTecnico,Status,HoraInicio,Danos" strSql = "Select " & campos & " from tabDTH where DatCompromisso = #" & Date &"# order by idEmpresa,idDatCompromisso" rsRota.Open strSql, Conexao, 3 ,3 response.Write(strsql & "<Br>" & rsRota.RecordCount) response.End() %> o resultado foi o seguinte: