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

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » SQL Anywhere database connections » SQL Anywhere for Windows Mobile » Connect to a database running on a Windows Mobile device

 

Creating an ODBC data source to connect to your Windows Mobile device

You can create an ODBC data source to connect to a running database on your Windows Mobile device.

Prérequis

There are no prerequisites for this task.

 Task
  1. On a Windows computer, click Start » Programs » SQL Anywhere 16 » Administration Tools » ODBC Data Source Administrator.

  2. On the User DSN tab, click Add.

  3. Click SQL Anywhere 16, and then click Finish.

  4. On the ODBC tab, in the Data Source Name field, type MobileServer.

  5. Click the Login tab and fill in the fields as follows:

    • Authentication   Click Database.

    • User ID   Make sure this field is blank. Each time you connect to a database, you must supply a user ID and password.

    • Password   Make sure this field is blank. The Encrypt Password box should be cleared.

    • Action   Click Connect To A Running Database On Another Computer.

    • Host   If you connected a Windows Mobile 5.0 or 6.0 device using Windows Mobile Device Center (ActiveSync) over a USB connection, try the Windows Mobile device IP address 169.254.2.1.

      For some Windows Mobile devices, especially older devices, you might encounter difficulty using this address. If so, try the localhost (127.0.0.1) IP address. In this case you must also have set up a proxy port.

    • Port   Specify the port number that the Windows Mobile device listens on.

      Use the port that the database server on the Windows Mobile device is configured to use when it is started. It is recommended that you use port 2639. See Starting a database server and connecting to a database on your Windows Mobile device.

    • Server Name   Fill in the server name if you need to connect to a specific database server running on the Windows Mobile device. Otherwise, make sure this field is blank.

    • Database Name   Fill in the database name if you need to connect to a specific database running on the Windows Mobile device. Otherwise, make sure this field is blank.

  6. Click OK.

Résultat

You can now use this data source to connect from a Windows desktop computer to a database running on your Windows Mobile device.

Suivant

To test the connection, you can use the dbping utility. If a database has been started on the Windows Mobile device, use a command similar to the following to test the connection.

dbping -c "DSN=MobileServer;UID=DBA;PWD=sql"
 See also