DatabaseCreation - Creating a database and record
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.
- Creation of a database (QSqlDatabase)
- Execute SQL Queries (QSqlQuery)
- Execute Asynchronous SQL Queries (SqlConnection)
- 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/native/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.