Ver Mensaje Individual
  #8 (permalink)  
Antiguo 30/05/2005, 10:51
Avatar de trasgukabi
trasgukabi
 
Fecha de Ingreso: septiembre-2004
Mensajes: 2.749
Antigüedad: 19 años, 7 meses
Puntos: 18
ah joder, pusiste que era el nombre del campo, no el valor. el nombre del campo será actividades, y el valor prueba1. a ver si planteamos bien las cosas que sino no hay manera.
Código:
Set rs = obj.execute("select actividad from actividades where actividad='"&valor&"'")
if rs.eof then
   obj.execute("insert into actividades.........values........'"&valor&"'")
   rs.close
   set rs=nothing
else
   rs.close
   set rs=nothing
   fallo=1
   x=1
   do while fallo = 1
      Set rs = obj.execute("select actividad from actividades where actividad='"&valor&x&"'")
      if rs.eof then
          obj.execute("insert into actividades.........values........'"&valor&x&"'")
          fallo = 0
      end if
      rs.close
      set rs=nothing
      x = x + 1
   loop
end if

Última edición por trasgukabi; 30/05/2005 a las 11:05