13.07.2015 Views

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The result of the test depends on the type of the 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 recordis directly inserted into the relevant data file.• The result of an Update query corresponds to the records that will be modified. During the test, youcan:- view only the records that must be modified,- directly modify the records in the relevant data file.• The result of a Delete query corresponds to the records that will be deleted. During the test, you can:- view the records that must be deleted,- directly delete the records from the relevant data file.Result of the queryThen, the result of the query test can be:• exported to a Word file (see page 206),• exported to an XML file (see page 207),• exported to an Excel file (see page 207),• exported to a HFSQL data file.• printed (see page 208).A record found in the query result can also be copied into the clipboard ("Copy" from the popup menu).Running the test of a query with parametersWhen running the test of a query with parameters, a window used to specify the different parameters is displayed.See the “Query with parameters”, page 213 for more details.PasswordIf one of the data files involved in the query is password protected, when running the test of the query:• if the password is specified in the initialization code of the project (HPass), the query is run.• if the management of the HFSQL errors was not customized (HOnError) and if the password is not specifiedby programming, the standard window for password input is displayed.Note: if the management of errors is customized in the initialization code of the project, this managementof errors will be used.Running the test of a query without checking the SQL codeFor the queries that use data files accessed via a Native Access or via an OLE DB provider, the HFSQL enginemay perform no query check.See “Runtime modes of a query in SQL code”, page 178 for more details.4.1.1 Exporting the query result to a Word fileFor the next operation, we consider that the result of the query test is displayed in the editor.To export the query result to a text file:1. Select "Export the table to Word" from the popup menu (right mouse click) of the query result. The windowfor selecting the text file is displayed.2. Specify the name and location of the RTF file.3. Choose the type of separator used between the different items of each record ("Type"):- Separator: Tabulation: The items will be separated by tabulations.- Separator: Semicolon: The items will be separated by semicolons.206Part 2: Query editor

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!