mobile databases, mobile forms, and mobile synchronization … where you need to work
Providing Pocket Access, Mobile Database, Windows CE Database, and Windows CE Development Solutions

Tip of the Month (May 2003)

Specifying Usernames and Passwords When Synchronizing

Visual CE can synchronize to a variety of ODBC-enabled databases, including Microsoft Access, SQL Server, Oracle, Sybase, etc. Some databases require a username and password before they can be accessed.

If you are synchronizing by bringing up Visual CE on the desktop and selecting FILE | SYNCHRONIZE | GO, you will be prompted for the username and password. However, if you have turned on the "Synchronize on connect" option, you may need make other arrangements to specify them when a handheld is connected.

If you want to be prompted for the username and password, use a text editor like notepad to modify a file called WCEODBC.INI (this file is in the C:\Windows or C:\Winnt folder of your desktop computer). Change:




This will cause a username/password dialog box to appear when synchronization is started.

Alternatively, you can embed the username and password right in the WCEODBC.INI file. To do this, use the UID= and PWD= keywords. For example, if the username was "SYWARE" and the password was "secret", your WCEODBC.INI file would look like this:


Note for SQL Server users: If you are synchronizing to a SQL Server table, make sure the table has a primary key.