There is a problem i have in xBROWSE :
For some reasons, i have to get the VAL-TYPE of a database.
No cols are defined.
When I do :
msgalert( VALTYPE( FIELDNAME( nOrder )) )
in a for next loop, the message returns allways < C >
maybe because of the functions in the xBROWSE-Class
Sample :
- Code: Select all Expand view
for nFor := 1 to Fcount()
oBrw5:aCols[ nFor ]:bRClickHeader := ;
{|r,c,f,o| cFELD := o:cHeader, ; // = oCol:cHeader
nOrder := o:nCreationOrder, ; // = Header-Click-Col
msgalert( VALTYPE( FIELDNAME( nOrder )) ), ; // all Fields are C
oBrw5:Refresh(), ;
oBrw5:SwapCols( 1, nOrder ), ; // Bring selected col to 1
oBrw5:GoLeftMost(), ; // Go to 1. Col ( indexed )
oBrw5:nFreeze := 1 } // Freeze 1. Col
next
cValToChar !!!!!
// -------------------
//----------------------------------------------------------------------------//
STATIC FUNCTION AdoGenFldBlk(oRs,nField)
RETURN {|| cValToChar( oRs:Fields(nField):Value) }
//----------------------------------------------------------------------------//
STATIC FUNCTION GenFieldBlock( cAlias, nField )
RETURN {|| cValToChar( ( cAlias )->( FieldGet( nField ) ) ) }
//----------------------------------------------------------------------------//
STATIC FUNCTION GenArrayBlock( bBlock, nCol, lAsString )
local block
if lAsString
block := {|| cValToChar( Eval( bBlock )[ nCol ] ) }
else
block := {|| Eval( bBlock )[ nCol ] }
endif
RETURN block
How can i findout the correct VAL-Type of a field,
inside of a xBrowse ?
Regard
Uwe