ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
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
<Source>.DeclareExternal (Function)
In french: <Source>.DéclareExterne
ODBCNot available with this kind of connection
Temporarily imports into the current analysis the description of a data file from an existing HFSQL data file. This data file is opened. To no longer use this File Description, call <Source>.CancelDeclaration.
Syntax
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget iPhone/iPadJavaUser code (UMC)AjaxHFSQL Client/ServerOLE DBNative Connectors (Native Accesses)

Use with an OLE DB access, a Native Connector, HFSQL Client/Server and an existing connection Hide the details

<Result> = <Source>.DeclareExternal(<Alias> , <Connection>)
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurs. HErrorInfo is used to identify the error.
<Source>: Type corresponding to the specified source
Name of the data file in the external database.
HFSQL Client/Server This parameter corresponds to the physical name of data file, in relation to the database (extension included). Example: "myfile.fic" (or if the database has subdirectories: ".\directory\myfile.fic").
If the data file is password protected, this password must be specified with <Source>.Password before using <Source>.DeclareExternal.
<Alias>: Character string
Logical name of the data file. This name will be used to handle the data file in the current application. This name can also correspond to a Data Source variable.
<Connection>: Character string
Connection to a database. This connection has been defined in the data model editor or described programmatically with HDescribeConnection.
Android Only connections to an HFSQL Client/Server database are available.
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)AjaxOLE DBNative Connectors (Native Accesses)

Use with an OLE DB access or a Native Connector Hide the details

<Result> = <Source>.DeclareExternal(<Alias> , <User> [, <Password> [, <Data source> [, <OLE DB provider or Native Connector> [, <Access>]]]])
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurs. HErrorInfo is used to identify the error.
<Source>: Type corresponding to the specified source
Name of the data file in the external database.
<Alias>: Character string
Logical name of the data file. This name will be used to handle the data file in the current application.
<User>: Character string
Name of the user of the data source.
<Password>: Optional character string
Password of the data file to open (if there is a password).
<Data source>: Optional character string
Full path of the data source.
<OLE DB provider or Native Connector>: Optional character string
Name of the OLE DB provider or one of the following constants:
hNativeAccessAS400Native AS/400 Connector (optional module)
hNativeAccessDB2Native DB2 Connector (optional module)
hNativeAccessInformixNative Informix Connector (optional module)
hNativeAccessMariaDBNative MariaDB Connector (optional module of WINDEV/WEBDEV)
hNativeAccessMySQLNative MySQL Connector (optional module)
hNativeAccessOracleNative Oracle Connector (optional module)
hNativeAccessPostgreSQLNative PostgreSQL Connector (optional module of WINDEV/WEBDEV)
hNativeAccessProgressNative Progress Connector (optional module)
hNativeAccessSQLAzureNative SQL Azure Connector (optional module, supplied with Native SQL Server Connector)
hNativeAccessSQLiteNative SQLite Connector
hNativeAccessSQLServerNative SQL Server Connector (optional module)
hNativeAccessSybaseNative SYBASE Connector (optional module)
hNativeAccessXBaseNative xBase Connector
hNativeAccessXMLNative XML Connector
hODBCOLE DB provider for ODBC. Allows you to access an ODBC source declared in the ODBC data sources of Windows
hOledbAccess97OLE DB provider for Access 97
hOledbAccess2000OLE DB provider for Access 2000
hOledbAccess2007OLE DB provider for Access 2007
hOledbAccess2010OLE DB provider for Access 2010
hOledbDBase5OLE DB provider for dBase 5
hOledbExcel2000OLE DB provider for Excel 2000
hOledbExcel2007OLE DB provider for Excel 2007
hOledbExcel97OLE DB provider for Excel 97
hOledbLotus4OLE DB provider for Lotus 4
hOledbOracleOLE DB provider for Oracle
hOledbSQLServerOLE DB provider for SQL Server
Caution: To use an OLE DB connection, you must:
  • install MDAC version 2.6 or later (setup performed by WINDEV/WEBDEV and when creating the client version)
  • install the OLE DB provider corresponding to the database used.
<Access>: Optional constant
Configures the type of access to the data file.
hOReadThe data file can be accessed in read-only. You can only read records. No record can be added or deleted.
hOReadWrite
(default value)
The data file can be accessed in read/write. You can read and write new records.
Remarks
  • All the HFSQL functions can be used on the imported data file except for the integrity management.
  • You can import as many descriptions as necessary.
  • This function can be used with data files in XML format.
  • To use <Source>.DeclareExternal in a stored procedure:
    • the relative path of the data file must be specified in relation to the directory of the database containing the stored procedure. The path must include the name and extension of the data file.
    • no connection must be used: the current database on which the stored procedure is found will be used.
  • By default, if the current project:
    • is associated with an analysis, the lock mode applied to the data files is the multi-user mode (the files are not locked when they are opened and they can be accessed by the other applications).
    • is not associated with an analysis, the lock mode performed on the data files is the single-user mode: the files are locked in read/write mode as soon as they are opened. This mode prevents the other applications from accessing the files already opened by the current application.
Component: wd290hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help