SQL Server Mobile Learning (III): SQL Server Mobile Remote Data Access (RDA)

Source: Internet
Author: User
Tags microsoft sql server 2005 ntfs permissions

1. RDA Introduction
2. Requirements and Configuration
3. RDA object Method
4. RDA sample code
======================================
1. RDA Introduction
------------
In Microsoft SQL Server 2005 mobile edition (SQL Server mobile ),
Remote Data Access (RDA) allows applications to access data from remote SQL Server database tables,
And store the data in the local SQL Server mobile database table.
Then, the application can read and update the local SQL Server mobile database table.
SQL Server mobile can trace all changes made to the current table.
Later, the application can update the changes in the local table back to the SQL Server table.

In SQL Server mobile,
Transmitting data from an SQL Server table to a local SQL Server mobile table is called request data.
Transmitting the changes made in the local SQL Server mobile table back to the SQL Server table is called Push data.

Applications can also use RDA to submit SQL statements,
Run the command on a remote SQL Server database.
For example, an application can submit an SQL statement to insert, update, or delete records into an SQL Server table.
An application can call any SQL statement that does not return a record set, including stored procedures on a remote system.

RDA is applicable when you do not need the full functions of SQL Server mobile merge replication (such as conflict resolution.

2. Requirements and Configuration
--------------

A. IIS
Use replication or remote data access (RDA) over HTTP)
Before accessing a database in Microsoft SQL Server,
You must first set the virtual directory and configure the appropriate NTFS permissions.
SQL Server 2005 mobile edition (SQL Server mobile)
Provides a wizard named "Configure web Synchronization Wizard"
Create and manage virtual directories and NTFS permissions.

B. SQL Server
To use Remote Data Access (RDA ),
The configuration method must be based on Microsoft Internet Information Service (IIS) and SQL Server identity authentication,
Grant access to the Microsoft SQL Server database.
This step can be completed by implementing RDA programmatically.

IIS Authentication Mode SQL Server Authentication mode must be granted database access permissions to users
Integrated Windows Authentication computername/iusr_computername for anonymous access
Or the configured IIS Anonymous user account
 
Basic Identity Authentication integrates windows identity authentication for IIS client users or groups.
 
Integrate Windows Authentication with the user or group of the IIS Client for Windows authentication.
Only when SQL Server and IIS run on
This configuration is only supported on the same computer.
 
Anonymous access, SQL Server Authentication in the RDA object pull, push
Basic authentication or submitsql Method
Or the SQL Server oledbconnectionstring parameter integrated with Windows Authentication
The specified user.
 
3. RDA object Method
---------------
Pull method (RDA)
Retrieving data from a remote Microsoft SQL Server database,
The data is stored in a single table in the local SQL Server mobile database.
 
Push method (RDA)
Send the changes from the SQL Server mobile table tracked locally to the original remote SQL Server table.
 
Submitsql method (RDA)
Submit SQL statements to run on a remote SQL Server database.

All three RDA object methods contain the oledbconnectionstring attribute.
This attribute provides the oledb connection string used to connect to a remote SQL Server database.
The oledb connection string provides connection information, including security information.

To use the push method, the application must already call the rda_trackoption parameter.
Set it to the pull method of trackingon or trackingonwithindexes,
A local SQL Server mobile table is created.

4. RDA sample code
---------------
Make up when testing is successful later

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.