|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
#1 |
|
Member (8 bit)
|
Dear Forum-
I am currently putting together a small customer/order system for a school project using VBScript in ASP pages. This is my problem... Internet Explorer tells me... "Microsoft VBScript compilation error '800a040e' 'loop' without 'do' /login.asp, line 88 Loop ^ This is a snippet of my code which seems to contain the problem... Do Until PHFRecordset.EOF CurrentJobType = PHFRecordset("JobType") CurrentPassword =PHFRecordset("Password") CurrentName = PHFRecordset("UserName") If UserID = CurrentName AND Password = CurrentPassword Then If CurrentJobType = 1 OR CurrentJobType = 2 Then Response.Redirect "PHF_Index.asp?UserID=&=UserID&UserType=Manager" ElseIf CurrentJobType = 3 OR CurrentJobType = 4 Then %> Response.Redirect "PHF_Index.asp?UserID=&=UserID&UserType=Sales" End If PHFRecordset.MoveNext Loop Else...a bunch of other code... I think my problem is that I have a nested If statement inside of the Do Loop, but I'm pretty sure that is a legal programming operation. I did take out my If statements, and just put in some trivial program that printed out a series of numbers using the Loop, and I encountered zero errors. I guess I would just like to know if it's possible to perform the operation I'm trying to do. Sorry for all the code mess, but I would greatly appreciate any help/advice on this issue.
__________________
Sincerely, Jim Kennedy DukeDiablo@GMail.com The Kennedy Compound (Currently Down) ----------------------- Win XP Pro|Athlon Thunderbird 1000|Shuttle Spacewalker A161|768MB 133 RAM|ATI Radeon 9500 Pro 128 MB Video| |
|
|
|
|
|
#2 | |
|
Member (10 bit)
|
Few problems with the code you posted:
Quote:
Also one of the if statements isn't ended. |
|
|
|
|
|
|
#3 |
|
Member (8 bit)
|
Thanks for checking...
The VBScript bracket was just something I forgot to omit when I posted...and the If statement is terminated with an "End If" but showing that would require way too much code for a post, so I left it out. Thanks for looking into it though. |
|
|
|
|
|
#4 |
|
Member (10 bit)
|
Why not attach a text file with the full code - can't really find a problem if we can't see all the code.
|
|
|
|
|
|
#5 |
|
Member (8 bit)
|
Good idea, sorry I wasn't very helpful before...
|
|
|
|
|
|
#6 |
|
Member (10 bit)
|
Your problem is where I mentioned.
PHP Code:
This means all statements used within a loop must be ended before the end of the loop. I'll try to have a look through the code in more detail later for suggestions. Last edited by dj4uk; 02-21-2002 at 07:27 AM. |
|
|
|
|
|
#7 |
|
Member (8 bit)
|
Thanks so much DJ-
Sorry to have bothered you with my problem, and please don't take up too much of your time on it. I'll try to look through it myself now that I know what type of problem I have. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|