Ver Mensaje Individual
  #5 (permalink)  
Antiguo 23/10/2007, 10:47
Avatar de JuanRAPerez
JuanRAPerez
Colaborador
 
Fecha de Ingreso: octubre-2003
Mensajes: 2.393
Antigüedad: 21 años, 6 meses
Puntos: 27
Re: como poner una condicion despues de una consulta SQL

asi seria:

Cita:
Set RS = Server.CreateObject ("ADODB.RecordSet")
sql = "select * from tutabla where tucampo = " & tuvariableacomparar
Set RS = oConnExactus.Execute(sql)
If RS.EOF = True and RS.Bof Then
'aqui haces el insert into, porque no hay registros
else
'le mandas a decir que ya esta registrado jejejeje
end if
Salup
__________________
JuanRa Pérez
San Salvador, El Salvador