Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.
SalBoolean IsDataSourceAvailable( SalString sName )
The IsDataSourceAvailable tells if a data source is available to the user.
Name | Description |
---|---|
SalString sName | Name of the data source object. Typically this is the name of a cFormWindow, cTableWindow, cDialogBox, cUserDataSource, or objects derived from these classes. |
The return value is TRUE if the data source is available, FALSE otherwise.
A data source is available if:
Applications should use the Var.Component.WindowRegister method to associate views with data sources.
To find out if a specific window is available in the application (regardless of whether the associated view is available), applications should use the Var.Component.IsWindowAvailable method.
To find out if a specific window is granted for a user (regardless of whether the associated view is available or if the window is included), applications should use the Var.Security.IsPresObjectAvailable method.
Function: ShowDetails Actions Select Case nWhat Case METHOD_Inquire Return Component.IsWindowAvailable( 'frmDetails' ) And Security.IsDataSourceAvailable( 'frmDetails' ) Case METHOD_Execute Return SalCreateWindows( 'frmDetails', hWndMDI )public SalBoolean DataSourceCreateWindow(SalNumber nWhat, SalString sWindowName) { #region Actions switch (nWhat) { case Const.METHOD_Inquire: return Var.Component.IsWindowAvailable(sWindowName)
&& Var.Security.IsDataSourceAvailable(sWindowName); ...............