![]() Start Lazarus and open project GuitarClub2.But for a reliable database application, it's better to remove the built-in Post and Cancel buttons and send the appropriate commands ourselves, giving us greater control of what and when things happen.įor this project, create a folder FPlaz\GuitarClub2, download GuitarClub2.zip and We must open a second instance of the table, indexed on ID, and navigate to the last record.īy default, a DBNavigator has buttons for Edit, Insert, Post and Cancel that automatically send commands to the attached dataset. For example, if the highest ID was '0010', the next ID must be '0011'.Īttention: when in insert mode, you can not simply search the table for the highest ID, because moving to another record would automatically post the current record. When adding a dbfMembers record, let the program fill the field ID with a value that doesn't exist yet.when it's empty instead, show a message to the user. Don't post a record if a field is illegal, e.g.Prevent automatic postingAt the start of an insert or edit of a table, disable the DBGrid. ![]() Thus the "integrity" of the database is compromized.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |