ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 13th, 2003, 11:13 AM
firetrap firetrap is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 21 firetrap User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Why error on an IF statemnet,

hi
can anyone tell me what im doing wrong as i keep getting error
HTTP 500.100 - Internal Server Error - ASP error


Microsoft VBScript compilation (0x800A03EE)
Expected ')'
/-----/----.asp, line 32, column 20



heres line 32

' browse and display results
<%
if (MyRecordSet.Eof true)then
<%Response.write("following result has been found)<br>")

Else

if (MyRecordSet.Eof false) then
<%Response.Write("please enter a keyword)<br>")
%>

<%
ENDif
%>
any help would be appreciated
thanks

Reply With Quote
  #2  
Old August 13th, 2003, 12:02 PM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Read your private messages and tell me if the code is correct!

It should fix the error your having!

Hope this helps!
Sincerely

Vlince

Reply With Quote
  #3  
Old August 13th, 2003, 12:08 PM
karsh44's Avatar
karsh44 karsh44 is offline
Just another guy
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 2,915 karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 13 h 6 m 22 sec
Reputation Power: 76
Your code is broken up strangely, and written wrong. Try this
Code:
<% 
if MyRecordSet.Eof = true then 
  Response.write "following result has been found <br>"

Else 

  Response.Write "please enter a keyword <br>"
  'you don't need the extra "if-then" b/c there are only 2 possible

END if 
%> 


Your problem is too many parentheses, and your first line section has two "<%" tags, rather than a "<% %>" pair.
HTH

[edit] Stupid fast responding Vlince (jk)
__________________
--Dave--

U2kgSG9jIExlZ2VyZSBTY2lzLCBOaW1pdW0gRXJ1ZGl0aW9uaXMgSGFiZXM=

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Why error on an IF statemnet,


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway