469,302 Members | 2,087 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,302 developers. It's quick & easy.

An easy one I hope

I want to redirect to a page if a variable is greater than 1 so I'm using
the following code but get an incorrect syntax error, can somebody please
tell me the correct syntax?

Cheers.

Code:

If iRecordCount = >1 then
response.redirect "test.asp"
End If
Jul 19 '05 #1
2 1235
Miguel Orrego wrote on 19 aug 2003 in
microsoft.public.inetserver.asp.general:
I want to redirect to a page if a variable is greater than 1 so I'm using
the following code but get an incorrect syntax error, can somebody please
tell me the correct syntax?

Cheers.

Code:

If iRecordCount = >1 then
response.redirect "test.asp"
End If


It is not English free-for-all, but a computer language:

If iRecordCount > 1 then
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
"Miguel Orrego" <mi****@stressedmonkey.net-nospam> wrote:
I want to redirect to a page if a variable is greater than 1 so I'm using
the following code but get an incorrect syntax error, can somebody please
tell me the correct syntax?

Cheers.

Code:

If iRecordCount = >1 then
You seem to have left a space between the equal sign and the greater
than sign, and you've got them in the wrong order. You're trying to
say "greater than or equal". The symbol for that is two characters: >=
with no space. So:

If iRecordCount >= 1 Thenresponse.redirect "test.asp"
End If

--
Tim Slattery
MS MVP(DTS)
Sl********@bls.gov
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Dave Smithz | last post: by
3 posts views Thread by Sune | last post: by
2 posts views Thread by Thomas | last post: by
1 post views Thread by Mad Scientist Jr | last post: by
2 posts views Thread by tnks | last post: by
1 post views Thread by Alex | last post: by
6 posts views Thread by graeme g | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.