HOW TO: Prebuild a Database in SQL Server CE (301217)



The information in this article applies to:

  • Microsoft SQL Server 2000 Windows CE Edition
  • Microsoft SQL Server 2000 (all editions)
  • Microsoft SQL Server 2000 64 bit (all editions)

This article was previously published under Q301217

SUMMARY

If you have a large quantity of data in your back-end Microsoft SQL Server database, it can be resource-intensive to have every Microsoft Windows CE device download all of the data by using a replication synchronization process. You can "prebuild" a Microsoft SQL Server CE copy of the database, and download it onto each device with the application. This article provides the steps necessary to complete this task.

back to the top

Requirements

The following items describe the recommended hardware, software, network infrastructure, skills, knowledge, and service packs you will need:
  • A Windows CE device
  • SQL Server 2000 Windows CE Edition
  • SQL Server 2000
back to the top

Prebuilding a SQL Server CE Database

To prebuild your SQL Server CE database:
  1. Set up one Windows CE device with the application.
  2. Use replication to connect the application to the back-end SQL Server database to create the SQL Server CE .sdf file on the device, and then synchronize all of the data.
  3. Stop the application, and use ActiveSync to connect to the device. Use the ActiveSync Explorer function to copy the .sdf file from the Windows CE device to the development system, and then store it with the rest of the application.

    NOTE: Whenever you copy the SQL Server CE application you should also copy the .sdf file at the same time.
  4. The SQL Server CE database includes move-copy code that detects when a database has been moved to a new device, and it automatically gets a new ID for the user. The first time that the .sdf file is used by your SQL Server CE application on a new device it gets a new ID, and the .sdf file is updated with only the changes made in the back-end SQL Server database after the copy was made.
back to the top

Registering the SQL Server CE Components on the Device

DllRegister.exe registers the components on the device and warns you about optional components that are missing from the device:
  1. Select the appropriate version of DllRegister.exe based on the processor type of your device.
  2. Copy DllRegister.exe from your development system to your Windows CE device and run it.NOTES:

    On Palm-size PCs or Pocket PCs, you can copy DllRegister.exe to the \Windows\Start menu folder, and then run it from the Start menu on the device.

    You can find DllRegister.exe in the \Program Files\Microsoft SQL Server CE\Device\Processor Family\Processor Type folder.
back to the top


REFERENCES

The SQL Server 2000 Books Online topic "Other Windows CE Deployment Issues Pre-building a SQL Server CE Database" documents this issue and has more information on "Securing Connections from Windows CE Devices" as well as "Upgrading from Previous Versions of SQL Server CE".

For a full discussion of encryption and certificates see "Configuring IIS Encryption" topic in the MSDN Online Library at: back to the top











Modification Type:MajorLast Reviewed:1/4/2006
Keywords:kbHOWTOmaster KB301217 kbAudDeveloper