Programming model for RDS using objects

Source: Internet
Author: User
Tags object model client
Programming | Object RDS is designed to access and update data sources through media such as the Internet information Server. The programming model specifies the sequence of activities necessary to complete this purpose. The object model specifies the objects whose methods and properties affect the programming model.

RDS provides a way to perform the following sequence of actions:

Specifies the program to be invoked on the server and how to invoke the program through the client (proxy). (RDS. DataSpace)


invokes the server program. Pass parameters to the server program that identifies the data source and the command that you want to publish. (Agent or RDS.) DataControl)


The server program obtains the Recordset object from the data source (typically by using ADO). You can optionally work with the Recordset object on the server. (RDSServer.DataFactory)


The server program returns the final Recordset object to the client application. Agent


On the client side, the Recordset object is converted into a format that the visual controls can easily use. (Visual controls and RDS.) DataControl)


Changes made to the Recordset object are returned to the server and used to update the data source. (Rds.datacontrol or RDSServer.DataFactory)
The following elements are a key part of the RDS programming model:

Rds. DataSpace


RDSServer.DataFactory


Rds. DataControl


Event
Rds. DataSpace

The client application must specify the server and the server program to invoke. Accordingly, the application receives a reference to the server program and treats the reference as the actual server program.

The RDS object model contains RDS. DataSpace the function of the object.

The server program can be specified using the program identifier (that is, ProgID). The server uses the ProgID and the server computer's registry to locate information about the program that needs to be initialized.

RDS can be partitioned internally depending on whether the server program is on a remote server connected by the Internet or Intranet, on a server that is connected to a local area network, or on a local Dynamic connection library (DLL) that is not on the server at all. This partition determines how data is exchanged between the client and the server, and there is a real difference in the reference type returned to the client application. However, from the user's point of view, the Division has no special significance. All of these just allow you to receive the available program references.

RDSServer.DataFactory

The default server program provided by RDS executes SQL queries against the data source, returns the Recordset object, or obtains the Recordset object and updates the data source.

The RDS object model represents this feature with a RDSServer.DataFactory object.

In addition, the object has a method of creating an empty Recordset object that can be filled out programmatically by the empty recordset. There is another way to create a Web page by converting a Recordset into a text string.

With ADO 2.0, you can overwrite some standard connections and RDSServer.DataFactory command behavior with DataFactory handlers and custom files that contain connections, commands, and security parameters.

Server programs can sometimes be called "business objects." You can write your own custom business objects that perform complex data access, validation checks, and so on. Even when writing your own custom business object, you can create a RDSServer.DataFactory object and use some of its methods to accomplish your tasks.

Rds. DataControl

RDS provides an alternative to RDS. The DataSpace and RDSServer.DataFactory functions are combined in a way. RDS also makes it easy for a visual control to use the Recordset object returned by a query to a data source. In most cases, RDS always accesses the information on the server as much as possible and displays the information in a visual control.

RDS object model with RDS. DataControl object to materialize the feature.

Rds. DataControl has two aspects. One aspect is related to the data source. If you set up RDS. DataControl command and connection properties, which will automatically use RDS. DataSpace creates a reference to the default RDSServer.DataFactory object. RDSServer.DataFactory then connects to the data source using the values of the connection properties, obtains the recordset from the data source using the value of the Command property, and returns the Recordset object to RDS. DataControl.

The second aspect involves displaying the returned Recordset information in a visual control. You can make visual controls and RDS. DataControl is associated (in the process called binding) and accesses the information in the associated Recordset object, and the query results are displayed on the Web page of Internet Explorer. Each RDS. The DataControl object binds a Recordset object that represents the results of a single query to one or more visual controls, such as text boxes, combo boxes, and grid controls, and so on. You can have multiple RDS on each page. DataControl object. Each RDS. DataControl objects can connect to different data sources and contain their own query results.

Rds. The DataControl object also has its own method for locating, sorting, and filtering the rows of the associated Recordset object. Although these methods are similar, they are different from the methods used by the ADO Recordset objects.

Event

RDS supports two of its own events that are independent of the ADO event model. Regardless of RDS. DataControl the onReadyStateChange event is invoked when the ReadyState property changes to notify the completion, end, or error of the asynchronous operation. Whenever an error occurs, the OnError event is invoked even during the execution of the asynchronous operation.

Note the Microsoft Internet Explorer Environment provides two additional events for RDS: ondatasetchanged and ondatasetcomplete.



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.