|
|
|
|
|
- Overview
- Implementation and use conditions
- Install the web service provided by PC SOFT on a server
- Install the files required to access the databases
- Use SQLConnectWS to connect to the database
- Use the SQL functions to handle the database
Accessing a database via a web service
The database can be accessed via a web service. This mode can be used in several cases: - Database access limited to HTTP functions.
- Access to an external database (Oracle, SQL Server, etc.) from an iOS or Android mobile device.
- ...
Implementation and use conditions Install the web service provided by PC SOFT on a server The web service setup program for accessing the databases is provided with WINDEV, WEBDEV and WINDEV Mobile. This program is available in the "INSTALL" subdirectory of the installation directory of the product. To install the web service: - On the server, run WXSaaSPACKRSRV.EXE, located in the "Install\WDRServer" directory of the desired IDE.
- In the wizard:
- Accept the license agreement.
- In the "Choice of modules" screen, select "Install the web service for accessing external databases".
- Specify the installation directory of the elements of the reserved server.
- Specify the URL for accessing the server where the web service will be installed. You have the ability to use a secure address. This address will be when connecting via the web service using SQLConnectWS.
- Validate the setup.
Remarks: - This web service must be installed on the server to which applications that use external databases will connect.
- The server must be able to access the external databases.
- The web service setup program installs a specific version of the WEBDEV Application Server. This version is required for the web service.
Install the files required to access the databases The database accessed via the web service can be on any computer. Only condition: this computer must be accessible from the server where the web service was installed. Different elements must also be installed according to the type of database. Accessing the database via a Native Access If the external database is to be accessed via a Native Connector, the following elements must be installed on the same computer as the web service:: - the corresponding client library, if necessary.
- the WINDEV or WEBDEV Native Connector libraries used to access the database.
Accessing the database via an OLE DB driver If the external database is to be accessed via OLE DB, the following elements must be installed on the same computer as the web service: - MDAC version 2.6 or later.
- the OLE DB provider corresponding to the database used.
Accessing the database via ODBC If the external database is to be accessed via ODBC, the ODBC data source must be configured in ODBC Administrator on the web service installation machine. This data source must be a "system data source". Use SQLConnectWS to connect to the database To connect to the database via the web service, simply use SQLConnectWS. This function corresponds to SQLConnect. An additional parameter appears: the URL for accessing the server where the web service was installed. This URL corresponds to the URL specified in the web service installation wizard. Remark: SQLConnectWS does not connect to the database. This function only checks that the web service at the specified address is responding. The connection to the database is established each time SQLExec is called. In this mode, for each query: the connection is established, the query is executed and the connection is then closed. Tip: How to find out whether the connection parameters are correct: You can create a small test program using SQLConnect to connect to the database. Simply run this program on the server where the web service is installed. If the access to the database is correct, the parameters specified in SQLConnect can be re-used in SQLConnectWS, by adding the server address. Use the SQL functions to handle the database Once connected to the database, the application can handle the data via the SQL functions of WLanguage. Remarks:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|