RDS Programming Model Details

zhaozj2021-02-17  45

RDS Programming Model Details

The following elements are key parts in 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 be called. Correspondingly, the application receives a reference to the server program, and this reference is used as a actual server program.

The RDS object model refers to this feature through the RDS.DataSpace object.

Use the program identifier (ie pROGID) to specify the server program. The server uses the ProgID and the registry of the server computer to locate the information of the program that needs to be initialized.

The RDS can be divided on the local dynamic connection library (DLL) on the remote server connected by the Internet or intranet or the server, or at all, or at the local dynamic connection library (DLL), RDS can be divided internally. This division determines how the data is exchanged between the customer and the server and has actual differences in the "reference" type returned to the client application. However, from the user's point of view, this division does not have a special meaning. All of this is just to receive the available program references.

Rdsserver.DataFactory

The default server program provided by RDS can perform SQL query on the data source and return the RecordSet object, or get the RecordSet object and update the data source.

The RDS object model refers to this feature with RDSServer.DataFactory objects.

In addition, the object has a method of creating an empty RecordSet object, which is available in a programmatic manner to fill in the empty Recordset. It is also another way to convert the RecordSet to the text string to create a web page.

Using ADO, you can use the DataFactory handler and custom files that contain connections, commands, and security parameters to overwrite the command behavior of RDSserver.DataFactory.

Server programs are sometimes referred to as "business objects". You can write your own custom business objects, which can perform complex data access, validity check, etc. 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 complete your own task.

RDS.DataControl

RDS provides methods that combine the functionality of RDS.DataSpace and Rdsserver.DataFactory. RDS also allows visual controls to easily use the RecordSet object returned by the query data source. In most cases, RDS always automatically access information on the server as much as possible, and displays the information in the visual control.

The RDS object model reflects this function with RDS.DataControl objects.

RDS.DataControl has two aspects. One aspect is related to the data source. If you set the command and connection properties of RDS.DataControl, it will automatically create references to the default RDSserver.DataFactory object using RDS.DataSpace. Then RDSServer.DataFactory connects the value of the connection attribute to the data source and uses the value of the command attribute to get the Recordset from the data source, and finally returns the RecordSet object to RDS.DataControl.

Second aspects relate to displayed RECORDSET information in the visual control. The visual control can be associated with RDS.DataControl (during a binding process), and access information in the associated Recordset object, the query results are displayed on the web page of Internet Explorer. Each RDS.DataControl object binds a RecordSet object that represents a single query result to one or more visual controls (such as text boxes, combo boxes, and grid controls, etc.). There are multiple RDS.DataControl objects on each page. Each RDS.DataControl object can connect different data sources and contain their respective query results. The RDS.DataControl object also has its own way for positioning, sorting, and filtering the associated RECORDSET object. Although these methods are similar, the methods used in the ADO Recordset object are different.

event

RDS supports two self-events independent of the ADO event model. No matter when the RDS.DataControl ReadyState property is changed, the OnReadyStateChange event is called, the completion of the asynchronous operation, end, or an error occurred. Whenever an error occurs, even if there is a process of execution of asynchronous operations, the OneRror event is called.

Note that the Microsoft Internet Explorer environment is provided to RDS two additional events: OnDataSetChanged (Recordset is acting, but also retrieves line) and OnDataSetComplete (Recordset has ended the search line).

转载请注明原文地址:https://www.9cbs.com/read-30926.html

New Post(0)