You need to "move" to the first record with next() before you can get values. Otherwise you remain before the first record ... and it's an error to use getXyz().

P.S.: and if you use an expression...