Makes sense that they would be 0, because you never set 'studentid', so they retain their implicit value (which is zero). Not seeing the full code, it would seem that 'studentid' is unnecessary, and you should just use 'studentID'. What purpose is served by having both of them? (As an aside, I would urge you not to have two fields with the same name that only differ in case; it's much too easy to make mistakes through typos).

N. Gonzalez
Greenhorn

Joined: Jul 17, 2005
Posts: 29

posted Jul 25, 2005 01:35:00

0

I was advised to have two variables, one of which should be static.

You really want this to be two variables. One to keep track of the current maximum assigned student id and one to keep track of the student id for that particular student. Tip: Think about which one of these needs to be static.