Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » SQL Anywhere for Windows CE » Configuring Windows CE databases » Creating a Windows CE database

Creating a Windows CE database using dbinit Next Page

Creating a Windows CE database using the CREATE DATABASE statement


The CREATE DATABASE statement can be used to create databases in Interactive SQL on your computer. However, you cannot copy them directly to a Windows CE device from this application. You must manually copy databases to your Windows CE device.

Enable checksums for Windows CE databases

When creating a database that will be deployed to Windows CE, you should enable checksums. This helps to provide early detection if the database file becomes corrupt.

To create a database using the CREATE DATABASE statement
  1. Open Interactive SQL on your computer.

    From the Start menu, choose Programs > SQL Anywhere 10 > Interactive SQL.

  2. The Connect dialog appears.

    If the Connect dialog does not appear automatically, choose SQL > Connect.

  3. On the Identification tab, select the ODBC Data Source Name option, and type SQL Anywhere 10 Demo in the adjacent field.

  4. Click OK to connect to the sample database.

  5. Type the following statement in the SQL Statements pane of Interactive SQL:

    CREATE DATABASE 'c:\\temp\\database-name.db'
    TRANSACTION LOG ON
    CHECKSUM ON;
    Tip

    You can also configure database properties such as encryption and page size using the CREATE DATABASE statement. See CREATE DATABASE statement.

  6. From the SQL menu, choose Execute.

    A database and transaction log are created in the c:\temp directory of your computer.

    For information about copying the database to your Windows CE device, see Copying a database to your Windows CE device.