DatabaseCRUD - Creating, reading, updating, and deleting database information
This example demonstrates how to create create, read, update, and delete data from a database using QSqlDatabase and QSqlQuery objects. It also demonstrates how to filter input data from users and demonstrates the QSqlQuery objects prepared statements. All data read from the database is also stored in a GroupDataModel which is then displayed in a list view.
- Creation of a database (QSqlDatabase)
- Execute SQL Queries (QSqlQuery)
- Execute prepared statements
- Filter user input
- Group Data Model and List Views
- BlackBerry Cascades SDK for BlackBerry 10
- BlackBerry 10 Alpha Device or BlackBerry 10 Simulator
Importing and running the project
- From the the Sample apps page, download and extract one of the sample applications.
- Launch BlackBerry 10 Native SDK.
- From the File menu, select 'Import'.
- Expand General, and select Existing Projects into Workspace. Click Next.
- Browse to the location where you extracted the sample file, and then click OK.
- The sample project should display in the the Projects section. Click Finish to import the project into your workspace.
- In the Project Explorer pane, Right-click the the project (for example hellocascades) and select Build Project.
- In the Project Explorer pane, Right-click the the project (for example hellocascades) and select Run As > BlackBerry C/C++ Application.
- The application will now install and launch on your device if not you might have to set up your environment: http://developer.blackberry.com/cascades/documentation/getting_started/setting_up.html
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.