If Condition
i have got one field in sql server 2000 database. field1 char 50
in one record, i m storing value -1
but it doesnt satisfy following condition
if (rs("field1")) = cstr("-1") Then response.write ("true") end if
i already checked its value by response.write and print -1 only.. then y its above condition is false???
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
If Condition
i am creating a kind of search using dropdown boxes to search the database. I have got two dropdown boxes one called location and one called cuisine i have sorted out some if statement. so that it works if they select either one or the other and if they select any location or any cuisine but the problem comes when i need them to be able to select a cuisine in a particular location ie on bothe boxes. i need it if both are selected at the same time then search the database via location and cuisine. can anybody help here is the code for the two files.
Multiple Condition
I WAS having problems. Solved it myself. I'll edit to show the working query for those who could use an example... I'm having a multiple condition problem in my query statement. I know the what the result should be, but I have something wrong... Here's the query: set GetNADs = server.CreateObject("ADODB.Recordset") set GetNADs.ActiveConnection = adoConnection ......
Set Condition Using Variable
what s the correct syntax of setting a condition with a variable that is retrieved from database like in the example below: dim x x = 9 if rsTypes("one") = x then response.write ("error")
Empty Value Condition
I'm trying to make a very simple condition about some variable if it is empty do something but my problem is that it always cannot see it is empty i mean i have a field in a table called title and this field is some times empty so i need to type "empty" if it is i tried this code ....
Search And Replace With Condition
I want to search through different strings and replace the ‘0’ with empty value. My problem is I want to search and replace the ‘0’ with empty values until there is a value other then ‘0’. Examples Ex 1: 000010000 - > my desired output -> 10000 Ex 2: 000170000 - > my desired output -> 170000 Ex 3: 004001000 - > my desired output -> 4001000
Session Objects And Condition
I've got the following code that sets a session object. set obj = server.createobject("Scripting.Dictionary") set session("testobj") = obj If I want to remove the session object, do each of the following does the same job? Which one is the best? 1 --> set session("testobj") = null 2 --> set session("testobj") = nothing 3 --> Session.Contents.Remove("testobj") If I want to check if the session object is not exist, which is the best option? 1 --> if (session("testobj") = null) then ... 2 --> if (session("testobj") = nothing) then ... 3 --> if (isobject(session("testobj"))) then ...
Change Font Colour According To IF Condition
I want to change the font colour to red if a recordset value is 'high' but i dont know where to put the font tags, Heres what i got so far: <td width="13%" align="center"><% if rs("priority") = "High" then response.write rs("priority") else response.write rs("priority") %></td> But where would i put the font tag and the colour, so it coloured the priorities marked as high red?
|