LanguageRetrieve

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 LanguageRetrieve(SalString sKey, ref SalString sValue)

The LanguageRetrieve method retrieves a value from the cache object that has been stored during the same session by calling Var.Cache.LanguageStore.

Parameters

Name Description
SalString sKey Unique key that identifies the value.
ref SalString sValue The value retrieved from the cache. The value of sValue remains unchanged if the key is not found in the cache.

Returns

The return value is TRUE if the key was found in the cache, FALSE otherwise.

Example

If Not Cache.LanguageRetrieve( 'Description.Field1', sFieldDesc )
   If DbPLSQLBlock( c_hSql, c_sDbPrefix ||
            'Language_SYS.Translate_Lu_Prompt( ..., :sFieldDesc )
       Call Cache.LanguageStore( 'Description.Field1', sFieldDesc )
C# code
if (!(Var.Cache.LanguageRetrieve("LOV." + __sViewName, ref sCacheValue))) 
{
	// Fetch LOV properties from server
	if (!(DbPLSQLBlock(cSessionManager.c_hSql, "&AO.Reference_SYS.Get_Lov_Properties_( :i_hWndSelf.cDialogDynamicLov.__sViewName,\r\n" +
		":i_hWndSelf.cDialogDynamicLov.__sKeyNameList, :i_hWndSelf.cDialogDynamicLov.__sColumnNameList,\r\n" +
		":i_hWndSelf.cDialogDynamicLov.__sColumnPromptList, :i_hWndSelf.cDialogDynamicLov.__sColumnDataTypeList,\r\n" +
		":i_hWndSelf.cDialogDynamicLov.__sColumnRefList, :i_hWndSelf.cDialogDynamicLov.__sColumnDbNameList,\r\n" +
		":i_hWndSelf.cDialogDynamicLov.__sSortInfo )"))) 
	{
		return false;
	}
	sCacheValue = __sKeyNameList + Const.strTAB + __sColumnNameList + Const.strTAB + __sColumnPromptList + Const.strTAB + __sColumnDataTypeList + Const.strTAB + __sColumnRefList + Const.strTAB + __sColumnDbNameList + Const.strTAB + __sSortInfo;
	// Cache info for faster retrieval next time
	Var.Cache.LanguageStore("LOV." + __sViewName, sCacheValue);
}