Tim Moores wrote:The only method that sets "subj" -which is what the setSubject returns- is "setSubj" - is that ever called? It's hugely confusing to have both setSubj and setSubject methods - you should have only one method, and that should set the value (like setSubj does). I don't see why it needs to return the value it has just set - the calling code already knows which value it has.
Also, class names in Java start with uppercase letters - the class should be called Tutor, not tutor.
nulljava.sql.SQLException: No value specified for parameter 10
Tim Moores wrote:Please explain what "it doesn't work" means - in detail.
Also, the setSubject method doesn't do anything. Surely it should set a value?
Tim Moores wrote:
// m4.setSubject(subject); //setSubject() returned null
What kind of object is m4? You posted an excerpt of a class that does not have a setSubject method (or a setSubjectNames method, for that matter), so we can't say anything.
Tim Moores wrote:What specific problem are you facing with this code? What does or does not work according to your expectations?
Knute Snortum wrote:Do you really mean "amp&" and not "&"?
Tim Holloway wrote:
Knute Snortum wrote:The &s have turned back into just &.
Note for the confused: The JavaRanch message display system also evaluates the '&' entity, so make sure when you type or copy an example to preview the output. If it's getting mangled, use the escapes to make it display as you are actually seeing it on your machine.
Knute Snortum wrote:Change all the & to &
Dave Tolls wrote:Well, that one doesn't seem to match the error posted earlier.
Are you sure that ULR caused that error?
Dave Tolls wrote:That's different from the original error, so what does your connection string look like now?