SQL Server Mobile Learning (1): Environment Building

Source: Internet
Author: User
Tags microsoft sql server 2005 management studio sql server management sql server management studio microsoft website

1. SQL Server mobile Introduction
2. Obtain SQL Server mobile
3. install necessary software
4. Install the development environment
5. Install the server environment
6. Configure the Web Synchronization Wizard
7. Use Internet Explorer to check the proxy configuration of the SQL Server Mobile Server
8. Use the SQL Server Mobile Database
======================================

1. SQL Server mobile Introduction
------------------------------
SQL Server mobile is
Designed for developers who develop Microsoft Windows Mobile Devices
The mobile database platform provided by Alibaba Cloud.

Microsoft SQL Server 2005 mobile edition (SQL Server mobile)
(Formerly known as Microsoft SQL Server 2000 Windows CE edition 2.0 (SQL Server CE ))
Extends Microsoft Enterprise Solutions to industry and personal information management (PIM) Applications on devices,
A consistent programming model is provided for developers to develop fast applications.

SQL Server Mobile provides the required relational database functions with a low memory overhead:
Reliable data storage, optimized query processors, and reliable and scalable connection functions.

Microsoft SQL Server 2005 mobile edition (SQL Server mobile)
As part of the application.
In this application,
Data is distributed between Microsoft SQL server on the desktop and SQL Server mobile on supported devices.

However, SQL Server mobile can also be used as a personal information management (PIM) tool or
Independent databases of other applications on the supported devices.

2. Obtain SQL Server mobile
----------------------------
You can obtain SQL Server mobile in the following ways:

(1). Integrated into SQL Server 2005.
C:/program files/Microsoft SQL Server
/90/tools/binn/vsshell/common7/IDE/sqlce30setupen. MSI

(2). Integrated into Microsoft Visual Studio 2005.
C:/program files/Microsoft Visual Studio 8
/Smartdevices/SDK/SQL Server/mobile/V3.0/sqlce30setupcn. MSI

(3) download from the Microsoft website.
For more information about downloading SQL Server mobile from a website,
See Microsoft SQL Server 2005 mobile edition home
Microsoft SQL Server 2005 mobile edition homepage.

3. install necessary software
------------------------------
Before installing the Microsoft SQL Server 2005 mobile edition (SQL Server mobile) component,
The following software must be installed on the desktop

A. Development computer and computer running IIS (if you plan to exchange data with SQL Server)
Must be Microsoft Windows 2000 SP4 or later,
Microsoft Windows XP Professional SP1
Or a later version or Microsoft Windows Server 2003.

If Windows XP SP2 is installed, use SQL Server mobile to connect,
HTTP access must be enabled.
HTTP access is disabled by default. To enable HTTP access, perform the following operations:
Open Control Panel ".
Click the Windows Firewall icon.
Click "advanced ".
In the network connection settings area, click Settings ".
Select the "Web Server (HTTP)" check box.
Click OK to confirm the change.

B. Install Microsoft. NET Framework 2.0 or later on the computer running IIS.
. NET Framework will be installed with Microsoft Visual Studio 2005 and SQL Server 2005.
To download. NET Framework 2.0 from the Microsoft website,
See. NET Framework 2.0 download center.

C. Install Microsoft ActiveSync 4.0 or later in the development environment and server environment.
ActiveSync can be downloaded from ActiveSync download for free.

4. Install the development environment
-----------------
Visual Studio
Visual Studio allows you to easily create and deploy SQL Server mobile applications.

In Visual Studio, you can use C # or Microsoft Visual Basic to create a hosted application,
You can also use the Visual C ++ for devices option to create a local application.

In Microsoft. NET Compact framework applications,
Add a reference to the system. Data. sqlserverce namespace.
The system. Data. sqlserverce namespace displays SQL Server mobile in. NET Compact framework.

Then, you can create databases, database tables, and columns, and fill the database with data.

When a. NET Compact framework application that references the system. Data. sqlserverce namespace is generated,
If the application is deployed on a smart device or a Pocket PC simulator,
Visual Studio will automatically check,
To check whether the. NET Compact framework and SQL Server mobile client components are installed on the device.
If these components are not detected,
These components are automatically installed on the device when you deploy an application that references the system. Data. sqlserverce namespace for the first time.

. NET Compact framework also contains the system. Data. sqlclient namespace,
It is used to develop applications that directly access databases in SQL Server 2000 or later.

To deploy applications to smart devices,
Select Start from the Debug menu in Visual Studio 2005 ".
Then, select the connected smart device or the Pocket PC simulator.
The default installation location on the device is/windows.

If you deploy an application from Visual Studio,
You do not have to install the SQL Server mobile component or. NET Compact framework on your device.

5. Install the server environment
-----------------
If Microsoft SQL Server 2005 mobile edition (SQL Server mobile) Applications
Data exchange is required between the Microsoft SQL Server database and the SQL Server mobile database,
You must install and configure the following items:
* Microsoft Internet Information Service (IIS)
* SQL Server 2005 or SQL Server 2000
* SQL Server Mobile Server tool (Installation Tool)

The SQL Server mobile environment can be configured as a single server environment or a multi-server environment.
In a single server environment, all components are on one computer.
In a multi-server environment, IIS and SQL Server are on different computers.

6. Configure the Web Synchronization Wizard
-------------------
Click Start to point to all programs ",
Point to Microsoft SQL Server 2005 mobile edition ",
Click "Configure web Synchronization Wizard ".

7. Use Internet Explorer to check the proxy configuration of the SQL Server Mobile Server
-------------------------------------------------------
In Internet Explorer,
Enter the URL of the SQL Server Mobile Server proxy.
(For example, http: // localhost/sqlce/sqlcesa30.dll, where sqlce is a virtual directory ).
If the SQL Server Mobile Server proxy is correctly configured,
Internet Explorer displays the string "SQL Server Mobile Server proxy 3.0 ".

By using? DIAG and? Stat parameter. You can search for Diagnostic and Statistical details.

8. Use the SQL Server Mobile Database
--------------------------
You can create or connect to a device or desktop
Microsoft SQL Server 2005 mobile edition (SQL Server mobile) database.

The SQL Server mobile database is stored in a file with the extension. SDF.
This file contains the complete content of the database, up to 4 GB.

SQL Server mobile can access and modify Database files on smart devices and tablet PCs.

SQL Server Management studio and other tools can also be used on desktops.

* Programming is adopted by using ADO. Net or ole db api functions
* Use the SQL Server mobile query analyzer on a device
* By using SQL Server Management studio on a desktop

By using SQL Server Management studio or transact-SQL statements,
You can connect to an existing database on a desktop.
You can also use a desktop to create and modify databases.
Then, you can use the object tree to view the database design in a tree hierarchy.
Each node has a shortcut menu. commands on the menu are used to modify or retrieve information about a database.

Some functions that can be executed in the SQL Server mobile database include:

* Create, delete, and edit tables and their associated data.
* Create, maintain, and delete indexes.
* Check the information architecture view and data type.
* Initialize replication and Remote Data Access (RDA) synchronization.

You can use the transact-SQL command (including the data operation language (DML ),
The Data Definition Language (DDL) and function) are used in the SQL Server mobile database.

You can also use replication or RDA to publish databases through local machines and hosted APIs.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.