Data synchronization requires a MobiLink consolidated database for the UltraLite database to synchronize with. In this lesson, you create a SQL Anywhere database.
Create a working directory to store the SQL Anywhere database.
This tutorial assumes that you are working in the c:\HelloBlackBerry\database directory.
Run the following command to create an empty SQL Anywhere database:
dbinit HelloBlackBerry.db |
Create an ODBC data source to connect to the database.
Click Start » Programs » SQL Anywhere 12 » Administration Tools » ODBC Data Source Administrator.
Click the User DSN tab, and then click Add.
In the Create New Data Source window, click SQL Anywhere 12 and click Finish.
Click the ODBC tab.
In the Data Source Name field, type HelloBlackBerry.
Click the Login tab.
In the User ID field, type DBA.
In the Password field, type sql.
From the Action list, click Start And Connect To A Database On This Computer.
In the Database File field, type c:\tutorial\database\HelloBlackBerry.db.
In the Server Name fields, type HelloBlackBerry.
Disable the Stop Database After Last Disconnect option.
Click OK.
Click OK on the ODBC Data Source Administrator window.
Run the following command to start Interactive SQL and connect to the SQL Anywhere database:
dbisql -c dsn=HelloBlackBerry |
Execute the following SQL statement in Interactive SQL to create the Names table on the consolidated database:
CREATE TABLE Names ( ID UNIQUEIDENTIFIER NOT NULL DEFAULT newID(), Name varchar(254), PRIMARY KEY (ID) ); |
Close Interactive SQL.
Click File » Exit.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |