ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / HFSQL properties
  • Equivalence
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
The Source property can be used on:
  • a Chart control: in this case, the Source property is used to get the source of the series: Table column, list of values, ...
    Remarks:
  • a connection: in this case, the Source property is used to:
    • Get the source of a connection (HFSQL Client/Server, OLE DB, etc.).
    • Define the source of a connection (HFSQL Client/Server, OLE DB, etc.). In this case, when you open a file that uses an open connection, that connection will be closed and reopened with the new parameters.
Example
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppUser code (UMC)Ajax
IF CHART_MyChart[3].Source = grTableColumn THEN
	// Changes the data source
	grSourceSeries(CHART_MyChart, 3, grListBox, "MyList")
END
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)AjaxHFSQL Client/ServerOLE DBNative Connectors (Native Accesses)
MyConnection is Connection
// Describe the connection
MyConnection.User = "USER"
MyConnection.Password = "PASSWORD"
MyConnection.Source = "MYSERVER" 
MyConnection.Database = "Database"
MyConnection.Provider = hAccessHFClientServer
MyConnection.Access = hOReadWrite
MyConnection.ExtendedInfo = "Extended information"
MyConnection.CursorOptions = hClientCursor

HOpenConnection(MyConnection)
Syntax
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppIOS WidgetUser code (UMC)Ajax

Getting the data source of a series Hide the details

<Result> = <Series>.Source
<Result>: Integer constant
Type of data source for the series:
grCallbackThe data source is a WLanguage function.
grItemThe data source is a file item.
grListBoxThe data source is a List Box control.
grProgrammingThe data source is a list of values.
grTableThe data source is an array.
grTableColumnThe data source is a table column.
<Series>: Character string
Series to use. Use the following syntax: <Chart name>[<Series number>].
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)PHPAjaxHFSQL Client/ServerOLE DBNative Connectors (Native Accesses)

Getting the source of a connection Hide the details

<Data source> = <Connection used>.Source
<Data source>: Character string
  • Name of the server (for HFSQL Client/Server, SQL Server, Oracle, MySQL, etc.)
  • Name of the file used as data source (for Access, XML, xBase, etc.)
<Connection used>: Character string or Connection variable
Name of the connection used. This name is defined:
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)AjaxHFSQL Client/ServerOLE DBNative Connectors (Native Accesses)

Defining the data source of the connection Hide the details

<Connection used>.Source = <Data source>
<Connection used>: Character string or Connection variable
Name of the connection used. This name is defined:
<Data source>: Character string
  • Name or IP address of the server (for HFSQL Client/Server, SQL Server, Oracle, MySQL, etc.).
  • Name of the file used as data source (for Access, XML, xBase, etc.).
Remarks
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)AjaxHFSQL Client/ServerOLE DBNative Connectors (Native Accesses)

Equivalence

The Server and Source properties are equivalent.
These two properties are kept to make the code easier to understand. In a connection (HFSQL Client/Server, SQL Server, Oracle, MySQL, etc.), the Server property is more appropriate because it is necessary to specify a server name.
However, in an Access, XML or xBase connection, the Source property is more appropriate because it is necessary to specify a file.
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/06/2024

Send a report | Local help