Click to See Complete Forum and Search --> : Pass & Fail???
jonkemm
02-25-2004, 05:44 PM
Hiya peeps!
I've been making a report system for my school and have created a 'level' table into which grades like "A*", "b-", "d+" etc. are written.
This has been working fine until I tried to write the words "pass" or "fail" into it, where apon an error is generated! Any ideas? Are these key words or something?
Jk
PeOfEo
02-25-2004, 05:53 PM
How are you printing it, when where how??? You can say something like
if datarecordthingy = f then
Response.write("fail")
end if
Of you if you are parsing all of the data into a string or something you can run a replace statement and replace f with fail.
buntine
02-26-2004, 12:52 AM
Your going to have to show us your source code. It will be an easy to fix thing.
jonkemm
02-26-2004, 04:08 AM
It's not the code - that's just a normal database driven dropdown menu writing through a form and then inserting into a table the normal way.
The point is that it works with all other grades except "pass" and "fail", if I change these to "pa" and "fa" then it works but I need them to say pass and fail. So I was wondering if these are keywords that knacker the code? And if there's a way around it?
Jk
buntine
02-26-2004, 05:50 AM
Oh ok, i understand now.
MS Access has a bunch of words which you should use in a table. Pass and Fail must be in that list.
Anyway, to get around this we could use ASP's Replace method.
yourVariable = Replace(LCase(yourVariable),"pass","p")
yourVariable = Replace(LCase(yourVariable),"fail","f")
This will convert 'fail' and 'pass', respectively.
Regards,
Andrew Buntine.