Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/05/2003, 06:27
Avatar de garcef
garcef
 
Fecha de Ingreso: agosto-2001
Ubicación: Querétaro, México
Mensajes: 289
Antigüedad: 23 años, 8 meses
Puntos: 0
Problema con checkbox e ingreso

Como demonios se inserta un registro con la caracteristica Si/No en ASP en una .mdb

hice este script

<%
'Creamos la conexión y el recordset
set cnn = Server.CreateObject("ADODB.Connection")
set rst = Server.CreateObject("ADODB.RecordSet")

cnn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("nwregister.mdb"))
sqltext = "SELECT * FROM tblUsers"
rst.Open sqltext,cnn,3,3

UserId = Request.Form("UserId")
Password = Request.Form("Password")
pass2 = Request.Form("pass2")
nombre = Request.Form("nombre")
edad = Request.Form("edad")
profesion = Request.Form("profesion")
correo = Request.Form("correo")
correo2 = Request.Form("correo2")
pais = Request.Form("pais")
ciudad = Request.Form("ciudad")
visita = Request.Form("visita")
eradio = Request.Form("eradio")
mas = Request.Form("mas")
resumen = Request.Form("resumen")
flash = Request.Form("flash")
ofertas = Request.Form("ofertas")
software = Request.Form("software")
distancia = Request.Form("distancia")
sexo = Request.Form("sexo")
musica = Request.Form("musica")
libros = Request.Form("libros")

If Request.Form("eradio") = "1" then
value=true
else
value=false
end if
If Request.Form("mas") = "1" then
value=true
else
value=false
end if
If Request.Form("resumen") = "1" then
value=true
else
value=false
end if
If Request.Form("flash") = "1" then
value=true
else
value=false
end if
If Request.Form("ofertas") = "1" then
value=true
else
value=false
end if
If Request.Form("software") = "1" then
value=true
else
value=false
end if
If Request.Form("distancia") = "1" then
value=true
else
value=false
end if
If Request.Form("sexo") = "1" then
value=true
else
value=false
end if
If Request.Form("musica") = "1" then
value=true
else
value=false
end if
If Request.Form("libros") = "1" then
value=true
else
value=false
end if

rst.AddNew
rst("UserId") = UserId
rst("Password") = Password
rst("pass2") = pass2
rst("nombre") = nombre
rst("edad") = edad
rst("profesion") = profesion
rst("correo") = correo
rst("correo2") = correo2
rst("pais") = pais
rst("ciudad") = ciudad
rst("visita") = visita
rst.update

rst.Close
set rst = Nothing
cnn.Close
set cnn = Nothing
%>

pero ingresa todos los que son cajas de texto pero los checkbox o casillas de verificacion no los ingresa

los campos en la bd tienen Si/No

:-p
__________________
garcef
Facebook: url]https://www.facebook.com/memelandiax[/url]
Twitter: @Memelandiax Vine:memelandiax Instagram: memelandiax Youtube: memelandiax