can some one please shed some light on what is wrong with my code - im selecting 3 records and simply want to display the Flight_Route if the ID = 11. I believe the problem is IF objRSLGWMANGLAY VR("ID") = 11 THEN which I believe to be valid code but im not sure now
the following code should output MANCHESTER to VANCOUVER [as this is what is on the sql table] inside a red div but instead does nothing. no errors either.
can someone please shed some light?
the following code should output MANCHESTER to VANCOUVER [as this is what is on the sql table] inside a red div but instead does nothing. no errors either.
Code:
<%
'CHECK FOR PRICES
DIM objLGWMANGLAYVR
Set objLGWMANGLAYVR = Server.CreateObject("ADODB.Connection")
objLGWMANGLAYVR.ConnectionString = "Provider=SQLOLEDB;Data Source=IPREMOVED;" & _
"Initial Catalog=Prices;User ID=IDREMOVED;Password=PASSREMOVED"
objLGWMANGLAYVR.Open
DIM LGWMANGLAYVR
LGWMANGLAYVR = "SELECT * FROM UK_Specials WHERE ID IN (7,11,15)"
DIM objRSLGWMANGLAYVR
Set objRSLGWMANGLAYVR = Server.CreateObject("ADODB.Recordset")
objRSLGWMANGLAYVR.Open LGWMANGLAYVR, objLGWMANGLAYVR
IF objRSLGWMANGLAYVR("ID") = 11 THEN
Response.Write "<div style=""background:red"">" & objRSLGWMANGLAYVR("Flight_Route") & "</div>"
End if
objRSLGWMANGLAYVR.Close
Set objRSLGWMANGLAYVR = Nothing
objLGWMANGLAYVR.Close
Set objLGWMANGLAYVR = Nothing
%>
Comment