Skip to content

Latest commit

 

History

History
 
 

databasecreation

DatabaseCreation - Creating a database and record

Sample Description:

This example demonstrates how to create new SQLite database using the QSqlDatabase class. It further demonstrates how to create tables, drop tables, and create records through the use of the QSqlQuery class. Lastly, there is a demonstration of using the SqlConnection object to show how to perform Asynchronous SQL operations.

Feature Summary:

  • Creation of a database (QSqlDatabase)
  • Execute SQL Queries (QSqlQuery)
  • Execute Asynchronous SQL Queries (SqlConnection)

Requirements:

  • BlackBerry Cascades SDK for BlackBerry 10
  • BlackBerry 10 Alpha Device or BlackBerry 10 Simulator

Importing and running the project

  1. From the the Sample apps page, download and extract one of the sample applications.
  2. Launch BlackBerry 10 Native SDK.
  3. From the File menu, select 'Import'.
  4. Expand General, and select Existing Projects into Workspace. Click Next.
  5. Browse to the location where you extracted the sample file, and then click OK.
  6. The sample project should display in the the Projects section. Click Finish to import the project into your workspace.
  7. In the Project Explorer pane, Right-click the the project (for example hellocascades) and select Build Project.
  8. In the Project Explorer pane, Right-click the the project (for example hellocascades) and select Run As > BlackBerry C/C++ Application.
  9. 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

Disclaimer

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.