Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Iai Galera, beleza?
É o seguinte,
O insert abaixo nao esta rolando na pagina, mas quando testo diretamente no Access, ele insere as informações. Qual a razao disso? Não entendo
INSERT INTO Clientes (Nome, Email, TelRes, Endereco, bairro, CEP, Numero, Complemento, Nascimento, ProfCliente, ProfConjugue, Conjugue, EmpCliente, EmpConjugue, dddRes, TelCom, dddCom, TelCel, dddCel, TelFax, dddFax, NascConjugue, dddConjugue, TelConjugue, Filhos, Renda, Veiculo, Motivo, Pagamento, Data, Local, Interesse, agradou_imovel, Corretor, Supervisor, Valor, outras_informacoes) VALUES('otavio','ojc66@yahoo.com.br','4686-1499','Av Washington Luiz',36,'01451-001','887','Casa','1983-11-16','Analista Programador','Escritora','Aghata Cristie','Spread','','11','','11','8405-8289','11','3742-3802','11','1988-1-15','11','3501-2515','Brian Nstill','até 1500,00','Jornal','Morar','A prazo','2005-2-7 08:00','Aqui mesmo','Gostei do barraco','As rachaduras na parede','Lucas','Donizete',166436.60,'De frente pra favela e de costas pro morro')
O codigo q faz o insert e esse:
ASP [/tr][tr] if Request.Form("cadastrar") <> "" then
strCliente = "INSERT INTO Clientes (Nome, Email, TelRes, Endereco, bairro, CEP, Numero, Complemento, Nascimento, "
strCliente = strCliente & "ProfCliente, ProfConjugue, Conjugue, EmpCliente, EmpConjugue, dddRes, TelCom, dddCom, TelCel, dddCel, "
strCliente = strCliente & "TelFax, dddFax, NascConjugue, dddConjugue, TelConjugue, Filhos, Renda, Veiculo, Motivo, Pagamento, "
strCliente = strCliente & "Data, Local, Interesse, agradou_imovel, Corretor, Supervisor, Valor, outras_informacoes) "
strCliente = strCliente & "VALUES('" & Nome & "','" & Email & "','" & telRes & "','" & Endereco & "'," & Bairro & ","
strCliente = strCliente & "'" & Cep & "','" & Numero & "','" & Complemento & "','" & Year(dtNasCli) & "-" & Month(dtNasCli) & "-" & Day(dtNasCli) & "',"
strCliente = strCliente & "'" & ProfCli & "','" & ProfConjugue & "','" & Conjugue & "','" & EmpCli & "','" & EmpConjugue & "','" & dddRes & "',"
strCliente = strCliente & "'" & telCom & "','" & dddCom & "','" & telCel & "','" & dddCel & "','" & telFax & "','" & dddFax & "',"
strCliente = strCliente & "'" & Year(dtNasConjugue) & "-" & Month(dtNasConjugue) & "-" & Day(dtNasConjugue) & "','" & dddConjugue & "','" & telConjugue & "',"
strCliente = strCliente & "'" & Filhos & "','" & Renda & "',"
select case (Veiculo)
case "jornal"
strCliente = strCliente & "'" & Jornal & "',"
case "outros"
strCliente = strCliente & "'" & Outros & "',"
case else
strCliente = strCliente & "'" & Veiculo & "',"
end select
strCliente = strCliente & "'" & Motivo & "','" & Pagamento & "','" & Year(Data) & "-" & Month(Data) & "-" & Day(Data) & " " & Hora & "',"
strCliente = strCliente & "'" & Local & "','" & Interesse & "','" & Opiniao & "','" & Corretor & "','" & Supervisor & "',"
strCliente = strCliente & Replace(Financiamento,",",".") & ",'" & Informacoes & "')"
'response.Write(strCliente)
'response.End()
set rsCliente = objBanco.execute(strCliente)
Response.Write("<script>if (window.confirm('Cadastro efetuado com sucesso, deseja cadastrar outro cliente?'))")
Response.Write("document.location.href='conteudo_casa.asp'")
Response.Write("else")
Response.Write("document.location.href='restrita.asp'")
end if
[/tr]
Carregando comentários...