Use Delphi to develop Web Service database programs

Source: Internet
Author: User
Use Delphi to develop Web Service database programs-general Linux technology-Linux programming and kernel information. The following is a detailed description. Step 1: Write server applications

First, select "File | New | Other…" in Delphi IDE ...", Then select the Soap Server Application icon on the WebServices page.

Then, in the New Soap Server Application dialog box, select Web App Debugger executable.

After you click OK, Delphi will automatically generate a WebModule, which contains three WebServices controls.

Then select the Soap Server Data Module icon on the WebServices page. After OK, the Soap Data Module Wizard dialog box is displayed in Delphi.

In Class Name, enter the Class Name: D6DBDataModule1. After you click OK, Delphi will automatically generate a SOAP data module. In this module, add the TdataBase, Tquery, and TdataSetProvider controls.

The properties of each control are basically the same as those of previous Delphi Database applications. TdataSetProvider is a DataAccess control that supports remote calls.

Compile and execute the application to register it. Complete the application design on the server.

Step 2: Compile the client application

Add a new application project, and add the TDBNavigator and TDBGrid controls in the Form.

Add a data module, and add the TSaopConnection, TclientDataSet, and TdataSource controls.

The TSaopConnection control uses the SOAP protocol to connect to the remote server.

Http: // WebServer address/WebService Application name/soap/SoapServerDataModule name

Set the properties of the TclientDataSet control, set the RemoteServer property to the name of the TsaopConnection control, and click ProviderName.

Next, add the following code to the unit where the form is located:
QUOTE:
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.