Author: ericzhen Source: joycode.com SQL Server CE 2.0 is the full name of the SQL Server 2000 Windows CE Edition version 2 0 2002 In the fall there, and then also happens to be .NET Compact Framework just came out... At that time, I wanted to study research, but because of the actual demand too little, no one asked questions, no one has a project, so I have been throwing. However, as Pocket PC / Windows Mobile is more and more familiar, some actual needs will drive it. Typical needs are Field Service. Many Field Service is still on paper, can't do all electronic. Example 1: The company sent people to the warehouse inspection, click the goods, you can synchronize the list to the Pocket PC, and then directly on the PPC in the warehouse, go back to the company. Otherwise, according to the original practice, you need to print a list first, come back and then enter again. Example 2: Lenovo sent people to the door to repair the computer, I have always taken a post-printed distribution process, and the repairs have been repaired later to fill in the maintenance record, and then let the customer sign. In this way, one is the file management of the paper-style worklet. The second maintenance record is on paper. If you want to use more analytical purposes such as knowledge management, Business Intelligence, etc., you need to find someone to enter. If you can synchronize the dispatcher to the Pocket PC, fill in the record directly and let the customer sign, come back to sync to the server, it is more convenient. So, I would like to put the SQL CE in the first two days, wrote some experience. If you don't touch SQL CE but also want to know, see that I should solve most of the common problems with SQL CE. 1. Architecture of SQL CE
The first question that must be answered is "What is SQL CE?" Simply put, SQL CE is a very simplified SQL Server 2000 / 7.0 running on the Pocket PC and other Windows CE platforms. The reason why it is "simplified" because it supports less function, less data type, and less tools. In addition to running in Device, SQL CE also has a set of development packages (which is SQLCE DATA Provider), and SQL CE Server Tool used to connect to SQL Server 2000 / 7.0 on the server, you can use vs.net Or EVB / EVC to develop. If you develop with EVB / EVC, use AdoCe 3.1; if you use .NET development, use .NET Compact Framework and SQL Server CE DATA Provider, the usage basically and the original ADO.NET does not have too much difference: running, SQL CE feels like a copy of SQL Server 2000 / 7.0, the SQL CE application itself takes up 1-3MB space on the Pocket PC, and the data is stored in a file that is called .sdf (in SQL2K) The same role of the MDF file). The operations made on the Pocket PC will first occur on SQL CE and then synchronize with SQL Server 2000 / 7.0 (Replication from time to time). Of course, you can also use the RDA (Remote Data Access) to directly let the data operation occurred on SQL Server 2000 / 7.0. One interesting place is to use Replication or RDA, mobile device must access SQL Server 2000 / 7.0, you must pass IIS, don't know if this design considers Web Server in DMZ and SQL will be placed in Internal: 2 SQL CE installation
If I don't make a mistake, SQL Server CE 2.0 is free, as long as SQL2K Standard / Enterprise's license can be downloaded and installed. But if you are making business development, it is best to verify. Interested in http://www.microsoft.com/sql/ce/downloads/ce20.asp to download the installation file of SQL Server CE 2.0, about 40 megabytes. After downloading, you must prepare these: vs.net 2003, SQL Server 2000 SP1 or Higher, IIS. The step of the installation is: a) Install SQL CE in the development environment. Mainly install the assembly file of SQLCE DATA Provider, and the installation file required after the back is installed. The installation method is to run the downloaded setup.exe directly, and you can do it all the way. Need to have VS.NET 2003. After installing, the effect is this: b) Install SQL CE Server Tool on IIS and configure the connection SQL Server 2000 database. If SQL Server 2000 is SP1 or SP2, this step can be installed with files under C: / Program Files / Microsoft SQL Server CE 2.0 / Redist / Server. If SP3 is installed, you can download the installation file at http://www.microsoft.com/sql/ce/downloads/sp3.asp. After installation, configure the connection between IIS and SQL Server 2000. It is possible to configure this: this step, if you have not created the Publisher on the SQL Server, you need to create one immediately. The permissions of the directory such as Snapshot Folder are preferably relaxed, and they will be eliminated. c) Finally, install it on the Pocket PC. In fact, this step does not need to do it yourself. VS.NET 2003 will automatically install when the deploy project. Of course, if you need to manually install, you can install files in C: / Program Files / CompactFrameworksDK / V1.0.5000 / Windows CE /, including database engines, Query Analyzer, etc. My Pocket PC is IPAQ 1940, the system is Chinese PPC 2003, I use the installation file is the WCE400 / ARMV4 / subdirectory in that directory. Other platforms are not clear. These are all done, and the installation of SQL CE is OK. 3. Instances of mobile iBuyspy