PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of items by programming
  • How to describe the data files by programming?
  • Handling the items of a data file described by programming
  • Log process
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Item description (Type of variable)
In French: Description de rubrique (Type de variable)
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
An Item description variable is used to describe by programming one or more items found in a data file. The description of each item is validated by HDescribeItem.
After this validation:
  • This item can be handled like any other item described in the analysis.
  • The "Item description" variable is reinitialized and it can be used to describe another file item by programming.
Versions 17 and later
iPhone/iPad This type of variable is now available for the iPhone and iPad applications.
New in version 17
iPhone/iPad This type of variable is now available for the iPhone and iPad applications.
iPhone/iPad This type of variable is now available for the iPhone and iPad applications.
Versions 18 and later
Universal Windows 10 App This type of variable is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This type of variable is now available in Windows Store apps mode.
Universal Windows 10 App This type of variable is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Example
MyItem is Item Description
MyItem1, MyItem2 are Item Descriptions
// Describe the AFile file
...

// Describe the "NAME" item
MyItem..Name = "NAME"
MyItem..Type = hItemText
MyItem..Size = 40
MyItem..KeyType = hUniqueKey

// Validate the description of "NAME" item
HDescribeItem(AFile, MyItem)

// Validate the description of AFile file
...
Syntax

Declaring one or more item descriptions Hide the details

<Variable Name> is Item Description

<Variable Name 1>, <Variable Name 2> are Item Descriptions
<Variable Name>:
Name of the "Item Description" variable to declare.
Note: The a and an keywords are optional: they provide better readability.

Describing an "Item description" variable Hide the details

To describe an "Item description" variable:
use the WLanguage properties specific to the item descriptions. See remarks for more details.

To validate the description of an "Item description" variable:
Use HDescribeItem.
Remarks

Properties specific to the description of items by programming

The following properties are specific to the item descriptions:
Note: The properties written in bold followed by a star must necessarily be initialized when describing an item by programming.
Property nameEffect
ComponentModify a component of a composite key
Versions 20 and later
TypeDescription
New in version 20
TypeDescription
TypeDescription
Specify the type associated with an Enumeration or Combination item.
KeyExpressionDefine the components of a composite key.
Versions 21 and later
CalculatedItemExpression
New in version 21
CalculatedItemExpression
CalculatedItemExpression
Define the SQL expression that returns the value of a calculated item (Expression item).
MaxThumbnailHeightDefine the maximum height of an item thumbnail.
LanguageDefine the parameters of the language used to perform the comparisons and the sort for a Unicode item.
LanguageDescribedDefine the parameters of the language used to perform the comparisons and the sort for a Unicode item.
MaxThumbnailWidthDefine the maximum width of an item thumbnail.
NbArrayElementNumber of elements in an array item.
Name ( * )Name of item.
NullTake the "NULL by default" option into account for the item.
Versions 16 and later
NullAllowed
New in version 16
NullAllowed
NullAllowed
Define whether the NULL value is allowed (or not) for the item.
Versions 21 and later
PersistedCalculatedItem
New in version 21
PersistedCalculatedItem
PersistedCalculatedItem
Define whether the value of a calculated item (Expression type) is stored in the data file.
DecimalPartDefine the number of digits in the decimal part of a Numeric item.
IntegerPartDefine the number of digits in the integer part of a Numeric item.
AccentuationSensitiveTake the accented characters into account when performing searches on the item
CaseSensitiveTake the case (uppercase/lowercase characters) into account when performing searches on the item
PunctuationSensitiveTake the punctuation characters (comma, period, ...) into account when performing searches on the item
Size (* mandatory according to the specified type)Size of a text item (character string, text memo, character)
Size of a Time item.
KeySizeSize of the section to index in the text memo.
Versions 21 and later
TimestampType
New in version 21
TimestampType
TimestampType
Define the type of timestamp for the item.
Versions 21 and later
TimestampUTC
New in version 21
TimestampUTC
TimestampUTC
Define whether the time of a timestamp item is UTC or not.
Type (* )Identifies and modifies the type of an item.
KeyTypeCharacteristics of a key item.
SortTypeCharacteristics of the sort on an item.
DefaultValueDefault value of an item.
Versions 21 and later
CalculatedDefaultItem
New in version 21
CalculatedDefaultItem
CalculatedDefaultItem
Define the SQL expression returning the default value of the item.
Special case: Describing a composite key
When describing a composite key by programming, ..Type is optional. On the contrary, ..KeyExpression must be used to describe the composition of the composite key.
Versions 20 and later
Special case: Describing a Combination or Enumeration variable:
New in version 20
Special case: Describing a Combination or Enumeration variable:
Special case: Describing a Combination or Enumeration variable:
Versions 21 and later
Special case: Describing a Timestamp item:
  • The item must be a DateTime, Date or Time item.
  • The timestamp type must be specified by ..TimestampType.
Special case: Describing an Expression item::
When describing an Expression item by programming, ..Type must not be used. You must use CalculatedItemExpression to describe the calculation expression.
New in version 21
Special case: Describing a Timestamp item:
  • The item must be a DateTime, Date or Time item.
  • The timestamp type must be specified by ..TimestampType.
Special case: Describing an Expression item::
When describing an Expression item by programming, ..Type must not be used. You must use CalculatedItemExpression to describe the calculation expression.
Special case: Describing a Timestamp item:
  • The item must be a DateTime, Date or Time item.
  • The timestamp type must be specified by ..TimestampType.
Special case: Describing an Expression item::
When describing an Expression item by programming, ..Type must not be used. You must use CalculatedItemExpression to describe the calculation expression.

How to describe the data files by programming?

To describe the data files by programming, you must:
  1. For each data file:
  2. Describe (if necessary) the characteristics of links via the HFSQL properties.
  3. Validate (if necessary) the description of each link (HDescribeLink.

Handling the items of a data file described by programming

When creating a data file in the data model editor, the names of the data files and items are automatically recognized by the compiler.
When creating a data file via a "File description" variable, the names of the data file and items are defined by ..Name. These names are not automatically recognized by the compiler. A compilation error occurs if these names are used to identify the data file or the items.
In order for the names of the data file and items described by programming to be recognized by the compiler, the name of this data file must be declared as data source. Then, this data file and its items can be handled by their name in the code editor.
For example:
AFile is File Description
...
AFile..Name = "CUSTOMER"
...
HDescribeFile("CUSTOMER")
...
CUSTOMER is Data Source
...
HReadFirst(CUSTOMER, "CUSTNAME")
Note: The name of the data file can also be declared with the Extern keyword. However, the execution speed of process will be slower.

Log process

When the data file is described by programming:
  • if the data file is logged and if no item is logged, all the items (except for the composite keys) are automatically logged.
  • if the data file is logged and if at least one item is logged, the other items are not modified.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment