DJJWP
Posts: 77
|
Posted: 08/06/2009, 5:37 PM |
|
The below function determines what picture starts a row of data based on the value of fields returned. I have them all working until I try to test "details" field for the word "power" in it anywhere. For some reason it does not like "LIKE"!!
In Before Show Row
Function brturnover_BeforeShowRow(Sender) 'brturnover_BeforeShowRow @404-4400D35A 'Custom Code @420-73254650 ' -------------------------
If brturnover.automation.value = 1
Then brturnover.Gears.Value = "../../images/movinggears3.gif"
'Power
elseif brturnover.automation.value = 0 and brturnover.Details.value LIKE "%POWER%"
Then brturnover.Gears.Value = "../../images/PwrOut.gif"
'Network
elseif brturnover.automation.value = 0 and brturnover.ServerName.value = ""
Then brturnover.Gears.Value = "../../images/Network.jpg"
'Winserv
elseif brturnover.automation.value = 0 and brturnover.ServerName.value <> ""
Then brturnover.Gears.Value = "../../images/windows-logo.gif" End If
' ------------------------- 'End Custom Code End Function 'Close brturnover_BeforeShowRow @404-54C34B28
I'm having an issue with this part...
elseif brturnover.automation.value = 0 and brturnover.Details.value LIKE "%POWER%"
Then brturnover.Gears.Value = "../../images/PwrOut.gif"
Because I want to test if it just "contains" and is not equal to a value, it fails.
I have tried:
brturnover.automation.value = 0 and brturnover.Details.value LIKE '%POWER%'
brturnover.automation.value = 0 and brturnover.Details.value LIKE "%POWER%"
What am I missing here?
ASP on Windows MySQL
_________________
Network Operations Rule |
Oper
Posts: 1195
|
Posted: 08/06/2009, 8:58 PM |
|
LIKE is not a ASP Function/command
brturnover.automation.value = 0 and instr(brturnover.Details.value, "POWER") > 0
if for some reason the POWER have a chance to come in lowercase use this:
brturnover.automation.value = 0 and instr(UCASE(brturnover.Details.value), "POWER") > 0
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |