ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL
  • Managing space characters in the searches
  • Space characters and searches in HFSQL Classic files
  • Space characters and searches: migration from Hyper File 5.5 to HFSQL Classic
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Managing space characters in the searches?
HFSQL ClassicAvailable only with this kind of connection
Managing space characters in the searches
Two types of search can be performed in the HFSQL data files:
  • exact-match search: search for all the records that exactly match the specified value.
  • generic search: search for all the records that start with the specified value.
In WINDEV 5.5, the space characters were used to fill the text items.
The searches were generic searches by default.
To perform an exact-match search, the sought value had to be filled with space characters on the size of the item (Complete). If this value was not filled with spaces, then a generic search was performed.
From WINDEV 8, for all the files created in the data model editor, the space characters are considered as being meaningful space characters.
The space characters are considered like any other character. A space character is found in an item only if this space character was typed.
The generic searches and the exact-match searches are no longer differentiated by the use of space characters.
The searches are exact-match searches by default.
To perform a generic search, the hGeneric constant must be used in HReadSeekFirst.
New search features are available. Search options can be defined for the text key items. These options allow you to perform a search:
  • sensitive to the case or not.
  • sensitive to accented characters or not.
  • sensitive to space characters and to the punctuation or not.
Option displayed in the "File item" window,
"General" tab of a text key item.
For backward compatibility with WINDEV 5.5, the data model editor includes the "5.5-compatible mode" (available in the "Compatibility" tab of the data file description). This mode is automatically selected for:
  • the files in 5.5 format found in a WINDEV 2024 analysis.
  • the files in 5.5 format migrated to WINDEV 2024.
Space characters and searches in HFSQL Classic files
WEBDEV - Server codeHFSQL Classic

HFSQL Classic file: Options selected in the data model editor
This table explains the effect of the selected mode ("Compatibility" tab of the file description).
This table is correct only if these 3 boxes are checked
("File item" window, "General" tab in a text key item)
"Store text items and text composite keys" option
Classic Mode option (by default for the new files)
Mode recommended for the new applications
5.5-Compatible Mode option
Exact-match searchHReadSeekFirst function
Generic searchHReadSeekFirst (hGeneric constant)
Management of space characters performed by defaultThe space characters are significant space characters by default. The space characters are considered like any other character. A space character is found in an item only if this space character was typed.
WithSpace has no effect.
When reading a record, the space characters found at the end of "text string" items are not removed.
In order for the space characters to be deleted, use WithSpace (like in WINDEV 5.5).
RemarkWhen switching from the "5.5-compatible mode" to the "Classic Mode", an automatic modification of the data files is generated.
For each record, the space characters found at the end of "text string" items are deleted.
Space characters and searches: migration from Hyper File 5.5 to HFSQL Classic
The table below presents the different types of search according to:
  • the type of the HFSQL data file used: File in Hyper File 5.5 format, File in Hyper File 5.5 format migrated to HFSQL Classic format, File in HFSQL Classic format.
  • the mode for storing text items (5.5-compatible mode or Classic Mode)
The search options for text keys are checked.
WEBDEV - Server code

Options selected in the data model editor
This array indicates the effect of the selected text item storage mode ("Compatibility" tab of the file description )
This table is correct only if these 3 boxes are checked
("File item" window, "General" tab in a text key item)
HFSQL Classic files
Hyper File 5.5 files
migrated to HFSQL Classic
Hyper File 5.5 files
Classic mode (by default)
Mode recommended for the new applications
5.5-compatible modeClassic mode5.5-compatible mode (by default)5.5-compatible mode (by default)
Exact-match searchRecommended for the new applicationsHReadSeekFirst functionHReadSeekFirst functionHReadSeekFirst functionHReadSeekFirst functionUnable to switch to Classic mode.
5.5-compatible codeGeneric search by default.HReadSeek function
The value of the sought item must be filled with space characters (Complete).
HReadSeek function
The value of the sought item must be filled with space characters (Complete).
Generic search only.Unable to switch to Classic mode.
Generic searchRecommended for the new applicationsHReadSeekFirst (hGeneric constant).HReadSeekFirst (hGeneric constant).HReadSeekFirst (hGeneric constant).HReadSeekFirst (hGeneric constant).Unable to switch to Classic mode.
5.5-compatible codeHReadSeek functionHReadSeek functionHReadSeek functionHReadSeek functionUnable to switch to Classic mode.
Management of space characters performed by defaultThe space characters are significant space characters by default. The space characters are considered like any other character. A space character is found in an item only if this space character was typed.
WithSpace has no effect.
When reading a record, the space characters found at the end of "text string" items are not removed.
In order for the space characters to be deleted, use WithSpace (like in WINDEV 5.5).
When reading a record, the space characters found at the end of "text string" items are not removed.
In order for the space characters to be deleted, use WithSpace (like in WINDEV 5.5).
The space characters are significant space characters by default. The space characters are considered like any other character. A space character is found in an item only if this space character was typed.
WithSpace has no effect.
Unable to switch to Classic mode.
RemarksWhen switching from the "5.5-compatible mode" to the "Classic Mode", an automatic modification of the data files is generated. For each record, the space characters found at the end of "text string" items are deleted.When switching from the "5.5-compatible mode" to the "Classic Mode", an automatic modification of the data files is generated. For each record, the space characters found at the end of "text string" items are deleted.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/19/2023

Send a report | Local help