RDS Programming Model Details

Source: Internet
Author: User
Tags empty object model query reference client
Programming RDS programming Model details







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.

RDS object model through RDS. DataSpace object to reflect this feature.

Use the program identifier (that is, ProgID) to specify the server program. 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 embodies this functionality 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, 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 object, which can perform complex data access, validation checks, and so on. Even when writing your own custom business object, you can create an instance of the RDSServer.DataFactory object and use some of its methods to accomplish your task.

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 the query 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 reflect this 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 (the Recordset works but still retrieves rows) and ondatasetcomplete (the recordset is closed Bundle retrieval Row).


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.