ok...ahi va algo mas de codigo:
Código:
<%
vFecha1= Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & "00:00"
vFecha2= Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & "23:59"
'Conección con la BD
sConnStr = "Driver={SQL Server};Server=MGUEVARA;Database=Rssql;UID=sa;Password=sa;"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open sConnStr
'*** MOTOR13 ***
Set rsMon13 = Server.CreateObject("ADODB.Recordset")
strSQL_Mon13 = "SELECT TOP 1 ID, MOTOR, ARRANQUE, PARO, FALLO, AUTO, MANUAL, FECHC FROM MOTORES_ESC5 WHERE FECHC >='" & vFecha1 & "' AND FECHC <='" & vFecha2 & "' ORDER BY FECHC DESC"
'Abre tabla temporal
rsMon13.ActiveConnection = objConn
rsMon13.Open strSQL_Mon13, objConn,2,2
rsMon13.Requery
%>
<td width="54" align="left"><div align="center">
<%
'Obtener el valor de la consulta y asignarlo a la variable, vMotor=rsMon13("MOTOR")
vArranque=rsMon13("ARRANQUE")
vParo=rsMon13("PARO")
vFallo=rsMon13("FALLO")
'Hacer comparacion.
If vMotor= 13B and vArranque= 1 and vParo= 0 and vFallo=0 then
response.write "muestra una imagen"
End If
If vMotor= 13B and vArranque= 0 and vParo= 1 and vFallo=0 then
response.write "muestra una imagen"
End If
If vMotor= 13B and vArranque= 0 and vParo= 0 and vFallo=1 then
response.write "muestra una imagen"
End If
%>
</div></td>
a ver que se puede hacer...gracias!!!...
Por cierto el tipo de dato que tengo en mi BD es "char".