In my continuing quest for trying to build a database that tracks the music I have written, I have come to another wall. I am trying to insert 4 buttons in a form, First Next Prev and Last. Do you guys have any suggestions? I have checked the demos and examples and the documentation, but I don't really understand it. So far I have :
Qt Code:
  1. void nnDBSPieceViewForm::firstPushButtonSlot()
  2. { QSqlQuery query("SELECT piece_name FROM main ORDER BY uid");
  3. query.exec();
  4. query.first();
  5. ui.pieceNameLineEdit->setText(query.value(0).toString());
  6. qDebug("firstPushButton Pressed");
  7. } // End firstPushButtonSlot
To copy to clipboard, switch view to plain text mode 
It compiles fine, but when I click the First button, in the console I receive:
QODBCResult::exec: Unable to execute statement:
[Microsoft][ODBC Driver Manager] Function sequence error
QSqlQuery::value: not positioned on a valid record
firstPushButton Pressed
Any suggestions?
Thanks in advance,

fnmblot