ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with reports and controls
  • What is a query performed on a connection?
  • Properties used to manage reports based on data files accessed via an ODBC driver or a Native Connector
  • Limit
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

What is a query performed on a connection?

A query performed on a connection is a query performed on data files handled via a specific ODBC driver or a Native Connector.

When the connection is created, you can define:
  • the connection name
  • the name of the data source
  • the username and password
  • the name of the database accessed (if there is more than one).
The report editor allows you to print the data coming from a query performed on a connection. All the parameters of the connection to use can be defined in the report editor or through programming with the WLanguage properties.
ODBCDatabaseName is used to:
  • Find out the name of the database used when printing a report based on a "query performed on a connection".
  • Specify the name of the database used when printing a report based on a "query performed on a connection".
Remark: This property must be used in the opening code of the report.
This property must be used only if several databases correspond to the same connection name.
Example
// -- Opening code of the report
RPT_Report1.ODBCConnectionName = "MyConnection"
RPT_Report1.ODBCSQLCode = "Select * from Products"
RPT_Report1.ODBCUserName = "MOORE"
RPT_Report1.ODBCPassword = "PSW"
RPT_Report1.ODBCDatabaseName = "MyDatabase"
Syntax

Finding out the name of the database used when printing a report based on a "query performed on connection" Hide the details

<Result> = <Report used>.ODBCDatabaseName
<Result>: Character string
Name of database used when printing the report based on a query performed on a connection. This name is available only if several connections of the same name corresponding to different databases have been defined.
<Report used>: Report name
Name of the report to be used.

Specifying the name of database to use when printing a report based on a "query performed on a connection" Hide the details

<Report used>.ODBCDatabaseName = <Database to use>
<Report used>: Report name
Name of the report to be used.
<Database to use>: Character string
Name of the database used to perform the base query of the report via the ODBC driver or a Native Connector. This property must be used only if several databases correspond to the same name of connection.
Remarks

Properties used to manage reports based on data files accessed via an ODBC driver or a Native Connector

The following properties are used to manage reports based on data files accessed via an ODBC driver or a Native Connector:
ODBCConnectionNameUsed to identify and change the name of the connection used to handle a database accessed via an ODBC driver or a Native Connector.
ODBCDatabaseNameUsed to identify and change the name of the database used by the query executed on a database accessed via an ODBC driver or a Native Connector.
ODBCPasswordUsed to identify and change the password associated with the user allowed to access a database via an ODBC driver or a Native Connector.
ODBCSQLCodeUsed to identify and change the SQL code of the query executed on a database accessed via an ODBC driver or a Native Connector.
ODBCUserNameUsed to identify and change the name of the user allowed to access a database via an ODBC driver or a Native Connector.

Limit

The ODBCDatabaseName property applies only to the reports based on a "query performed on a connection".
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