ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / Managing xBase files / WLanguage functions
  • Using the EXTERN keyword
  • File description
  • Limitations
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
HDBDescribeFile (Function)
In french: HDBDécritFichier
Native Connectors (Native Accesses)HFSQL ClassicAvailable only with these kinds of connection
Describes a data file in dBase3 format (most common format) through programming. This function is used to specify the name, abbreviation and access path of xBase file.
Example
HDBDescribeFile("DBCUSTOMER", "CD", "C:\FILE\CUSTOMER.DBF")
HDBDescribeField("LASTNAME,C,20")
HDBDescribeField("FIRSTNAME,C,20")
HDBDescribeField("AGE,N,3,0")
HDBDescribeField("BALANCE,N,10,2")
HDBDescribeField("MARRIED,L")
HDBDescribeField("DOB,D")
HDBDescribeField("INFO,M")
HDBCreation()
Syntax
<Result> = HDBDescribeFile(<Logical name of xBase file> , <File prefix> , <Full name of physical file>)
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurs. HError is used to identify the error.
<Logical name of xBase file>: Character string
Logical name of xBase file to create. This name will be used by all the functions that handle xBase files.
<File prefix>: Character string
File abbreviation (2 characters).
<Full name of physical file>: Character string
Path where the file will be created on disk and full file name (with the extension).
Remarks

Using the EXTERN keyword

We recommend that you use the EXTERN keyword to declare a file that will be described and created, in order to avoid warnings in the code editor. For example:
EXTERN Customer
HDBDescribeFile("CUSTOMER", "DA", "C:\FILE\CUSTOMER.DBF")

File description

  • An error 1009 will be generated if the file is already opened during the call to HDBDescribeFile.
  • The file will be created on disk by HDBCreation.
  • The file structure is described by HDBDescribeField. The number of items created in a file is limited to 128.
  • The indexes are described by HDBDescribeIndex.

Limitations

  • This function is not available when using a database via Remote Access.
  • This function is not available when using a stand-alone executable.
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help