SyntaxFix
Write A Post
Hire A Developer
Questions
You have to call next() before you can start reading values from the first row. beforeFirst puts the cursor before the first row, so there's no data to read.
next()
beforeFirst