To perform a Windows program in a Web page (turn)

Source: Internet
Author: User
Tags function examples access database
To execute a Windows program in a Web page

Many companies now face a challenge: How to execute Windows applications that exist in a web environment. Here is a description of the technology to implement this function, it strives for the generation
Code to make the smallest changes in the Windows environment to complete everything that should be done.
Existing Windows applications
The Windows example program that you want to execute on the web is very simple, it's written in VB, and it has a form. At run time, show the employee's letter on the form
, this information comes from a table in an Access database. The form has a single, Next, Previous, and last buttons that allow users to browse records. While
You can also change the data by button Add, Delete, and update.
This program communicates with the database through a COM class, and it has the following methods:
AddEmployee () Add a record to the table and save the information for the new employee
UpdateEmployee () Update a record
Deleteemployee () Deletes a record
GetEmployees () Get information for an employee
When the program is running correctly, the browser displays the following:
Developing Web Applications
In traditional Web applications, most of the processing is done on the server side. Here, we will try to do some processing on the client to reduce the work on the server
Volume. That is, let the client complete the processing of the display information and leave the business rules and database access to the server side. This is like an n-tier processing model.
When the user needs to access another different data, we do not want to transfer from the server to the entire Web page, therefore, we need to find a Web client in the background and
How the Web server communicates information. In this example, we use Microsoft's XMLHTTP COM object component, which comes with Internet Explorer 5.0
Of Of course, you can also write a Java applet that functions like this to overcome this limitation.
Server-side code
Let's start with a study of the COM classes of VB applications to the Web, which can be done by writing ASP pages to invoke each method in the COM class
(Addemployee.asp, updateemployee.asp, deleteemployee.asp, getemployee.asp).
Knowing these, you can access COM in the Web
Class method.
ASP pages should be able to accept the same parameters as COM classes that send calls to the original COM class. The main difference here is that all output is in XML format
Of We use another COM class called Xmlconverter, and the output of the conversion method is in XML format. Xmlconverter's code is included in the download file, which has a
function to accept an ADO recordset as a parameter and convert it to an XML document. The function examples for this purpose can be easily found from the Internet, more than
Such as:
Http://www.vbxml.com/xml/guides/developers/ado_persist_xml.asp
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.