XMLHTTP Technology:
----------------------------------------------------------
Remote management technology of database
an important link in the modern application of Internet based WAN is the remote monitoring of database. First of all, a brief review of the Internet Database Remote management technology development process and mode:
early by writing Cgi-bin program module for database remote management. But the cgi-bin is slow to run, maintenance is inconvenient, now has been basically discarded.
The use of Component object models (Component object model, COM) over the years has been very useful and effective. However, if you are using a Third-party server (the author's web site is built on a third party virtual host), the server side often does not allow users to register their own components for confidentiality or other business reasons.
Introduced in recent years by Microsoft Corporation. NET platform and Sun Company's Java EE platform are very high-end database remote management and service platform. can provide high quality multi-layer (n-tier) application services.
of which,. NET (Simple Object access Protocol, SOAP) using Hypertext Transfer Protocol (hypertext Transfer Protocol, HTTP) and Extensible Markup Language (extensible Markup Language, XML technology enables communication services across systems (such as windows-linux) that have been widely accepted and used by developers. Many large applications, such as Enterprise resource planning (Enterprise resource Planning, ERP), are built on such a large platform.
But for small and medium-sized applications, such as the construction and maintenance of a website, this large-scale application platform is somewhat cumbersome, the overhead is too large.
Microsoft, once a laggard in Internet technology and Java technology, is in the forefront of XML application development. The XMLHTTP protocol in her XML parser (MSXML) is a very convenient and practical customer/service communication conduit. The comprehensive use of XMLHTTP and ActiveX Data Objects (ActiveX Objects, ado/adox) can easily and conveniently implement remote database management.
This paper describes how to use XMLHTTP and ado/adox to make remote database management synthetically.
second, the database remote management system
The task flow of database remote administration is:
1, the client sends the database structure and the data query or the modification instruction to the service end.
2, the server accepts and executes the instructions and returns the results to the client.
3, the client accepts and displays the results of the instructions returned by the server.
The two key links to implementing remote database management are:
1, the client and the server between the instruction upload and the results of the data channel, by the XMLHTTP protocol implementation.
2, the service end and the database between the direction of the transfer and results returned by the role of the middle-tier Ado/adox interface completed.
Third, the use of XMLHTTP
As the name suggests, XMLHTTP is a Hypertext Transfer protocol that transmits XML-formatted data.
In fact, the XMLHTTP data transfer process is more flexible:
The instructions it uploads can be XML format data, or it can be a string, a stream, or an unsigned integer array. It can also be a parameter of a URL.
The result can be an XML-formatted data, a string, a stream, or an unsigned integer array.
Please refer to the link at the end of this article.
The process of invoking XMLHTTP by the client is simple, with only 5 steps:
1. Create XMLHTTP objects
2, open the connection with the service side, at the same time define instructions to send the way, the Service page (URL) and request permissions.
The client opens a connection to the Service Web page of the server through the Open command. As with normal HTTP instructions, you can use the "get" method or the "POST" method to point to the Service Web page of the server.
3, send instructions.
4, waiting for and receiving the processing results returned by the service side.
5. Release XMLHTTP Object
xmlHTTP Method:
Open Bstrmethod, bstrURL, Varasync, Bstruser, Bstrpassword
Bstrmethod: Data transfer mode, i.e. get or post.
bstrURL: URL of the Service Web page.
Varasync: Whether to execute synchronously. The default is true, which is synchronous execution, but can only be implemented synchronously in the DOM.
It is generally set to false in the application, that is, asynchronous execution.
Bstruser: User name, can be omitted.
Bstrpassword: User password, can be omitted.
Total 2 page: previous 1 [2] Next page