AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Pruebas
  • Overview
  • Query test result
  • Test result
  • Handling the result
  • Notes
  • Managing the passwords of data files
  • Taking the hQueryWithoutCorrection constant into account during the test (query that uses a connection)
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview
The query editor allows you to test the query result (Go or "Test query" in the context menu of the query).
During the test of the query, the initialization code of the project is run.
Result of the query
Remarks:
  • Several query tests can be run at the same time.
  • The last test run (window, query, report, etc.) can be run again from any project element via the "GO .. Re-run the last test" option in the quick access buttons.
    Re-running the last test
  • During the test of a query with parameters, a window allows you to specify the different parameters.
    In this window, you have the ability to select an existing value via Existing value. The following menu is displayed:
    Test values
    You can:
    • select one of the possible values among the ones found in the data file,
    • view the entire data file.
      Attention This option is only available if Live Data is enabled. For more details, see Live Data.
  • The Calculator button is used to automatically display the mean, the total, the minimum and maximum values for the numeric result items.
Reports and Queries cannot be used to check:
  • insert queries,
  • update queries,
  • delete queries.
When the query is tested in Reports and Queries software, the "Project initialization" event is executed.
Query test result

Test result

The test result depends on the type of query:
  • The result of a select query corresponds to the records selected by the query.
  • The result of an insert query corresponds to the record that will be inserted. During the test, the record is inserted directly into the data file.
  • The result of an update query corresponds to the records that will be modified. During the test, you can:
    • see the records that will be modified,
    • or directly modify records in the data file.
  • The result of a delete query corresponds to the records that will be deleted. During the test, you can:
    • see the records that will be deleted,
    • or delete records directly from the data file.

Handling the result

Then, the query result can be:
  • Exported to a text file.
  • Exported to an XML file.
  • Exported to an Excel file.
  • Exported to an HFSQL data file.
  • Printed.
A record found in the query result can also be copied to the clipboard.
For more details, see Result of a query in test mode.
Notes

Managing the passwords of data files

If one of the data files taking part in the query is password protected, during the test of the query:
  • If the password is specified in the project initialization code (HPass), the query is executed.
  • If the management of HFSQL errors was not customized (HOnError) and if the password is not specified through programming, the standard window for password input is displayed.
    Note If error handling is customized in the project initialization code, this error handling will be used.

Taking the hQueryWithoutCorrection constant into account during the test (query that uses a connection)

By default, WINDEV and WEBDEV interpret the SQL queries on OLE DB and on ODBC via the OLE DB provider.
To prevent the query from being interpreted during a test in the query editor:
  • Select query:
    1. Display the query description ("Query description" in the context menu of query).
    2. On the right, click on the "Advanced" button. The window for advanced parameters is displayed.
    3. Go to the "hQueryWithoutCorrection" tab.
    4. Check "Ejecutar con hQueryWithoutCorrection en modo de prueba".
    5. In the list, select the connection to use. The list presents the different connections defined in the data model editor. You can also enter directly the name of a dynamic connection (defined programmatically with HDescribeConnection).
      Please note If you are using a dynamic connection, this connection must be defined:
      • in the project initialization code,
      • in a code run from the project initialization code.
  • Insert, Update or Delete query:
    1. Display the query description ("Query description" in the context menu of query, "General" tab).
    2. Check "Ejecutar con hQueryWithoutCorrection en modo de prueba".
    3. In the list, select the connection to use. The list presents the different connections defined in the data model editor. You can also enter directly the name of a dynamic connection (defined programmatically with HDescribeConnection).
      Please note If you are using a dynamic connection, this connection must be defined:
      • in the project initialization code
      • in a code run from the project initialization code.
This mode can be used if you directly type the SQL code of your query in the query editor.
Note At runtime, the constant hRequestWithoutConnection constant can be specified directly in function HExecuteQuery.
The effects of hQueryWithoutCorrection constant
hQueryWithoutCorrection is not specifiedhQueryWithoutCorrection is specified
The connection associated with the data files in the query is defined automatically.The connection to use must be specified in HExecuteSQLQuery.
Replacement of all PC SOFT proprietary signs (e.g. ']=' begins with) with their standard SQL equivalent.No replacement is performed. The standard SQL symbols must be used.
Format the dates and times according to the format used by the database.
For example, the WINDEV dates are in 'YYYYMMDD' format while in Access, the dates are in #YYYYDDMM# or #YYYYMMDD# format depending on the system language.
No formatting is performed. The format recognized by the database must be used.
Floats are formatted (the decimal separator can be '.' or ',')No formatting is performed for the floats.
Depending on the database used, the alias names are replaced with the full names of the items in WHERE, ORDER BY and GROUP BY.
For example, the JET engine (Access, dBase, etc.) accepts no alias name in the Where clause of a query
No replacement is performed. The full names of the items must be used in the query code for WHERE, ORDER BY and GROUP BY.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 08/01/2025

Señalar un error o enviar una sugerencia | Ayuda local