
26/11/2003, 12:01
|
|
CONEXION:
Set conexion = Server.CreateObject("ADODB.Connection")
conexion.Open "driver={SQL Server};server=NOMBRE_SERVER; uid=USUARIO; pwd=CONTRASEÑA; database=BASE DE DATOS"
CONSULTAS:
SQL = "SELECT * FROM TABLA_EN_SQL"
Set TABLA_ASP= conexion.execute(SQL)
Do while not TABLA_ASP
If (TABLA_ASPl("CAMPO1") = VARIABLE then
.............
.............
End If
TABLA_ASP.MoveNext
Loop
INSERCION
variable_asp = request.form("caja_de_texto1")
SQL= "INSERT INTO TABLA_SQL(CAMPO1) VALUES(" & variable_asp & ")"
Set TABLA_ASP= conexion.execute(SQL) |