Tema: Insert Into
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 25/06/2004, 03:47
Avatar de LeCLUB
LeCLUB
 
Fecha de Ingreso: abril-2003
Ubicación: Barcelona (España)
Mensajes: 205
Antigüedad: 22 años
Puntos: 1
También puedes ir "añadiendo" más datos a la consulta SQL:

Command1.CommandText = "SELECT * "
Command1.CommandText = Command1.CommandText & = "FROM Tabla1 "
Command1.CommandText = Command1.CommandText & = "WHERE bla bla bla"

y así tantas veces como quieras, y si quieres utilizar If...End if, tambien puedes:

Command1.CommandText = "SELECT * "
Command1.CommandText = Command1.CommandText & = "FROM Tabla1 "
if Request.QueryString("campo") = 1 Then
Command1.CommandText = Command1.CommandText & = "WHERE id=1"
else
Command1.CommandText = Command1.CommandText & = "WHERE id=2"
End if

Un saludo
__________________
Documentación de VBScript V5.6 en Español:
http://download.microsoft.com/downlo...ES/scd56es.exe