Daniel
con los 煤ltimos cambios en thdolphin
sucede que en una consulta con columnas tipo l贸gicas o de fecha, cuando no contienen datos, se convierten en tipo caracter vaci贸.
revisando el c贸digo y comparando he realizado los siguientes cambios:
otra cosa, has visto este post
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=27901&p=155778&hilit=carlos+vargas#p155778
con los 煤ltimos cambios en thdolphin
sucede que en una consulta con columnas tipo l贸gicas o de fecha, cuando no contienen datos, se convierten en tipo caracter vaci贸.
revisando el c贸digo y comparando he realizado los siguientes cambios:
METHOD VerifyValue( nIdx, cField ) CLASS TDolphinQry
聽 聽LOCAL cType, uValue
聽 聽LOCAL nPad
聽 聽cType := ::aStructure[ nIdx ][ MYSQL_FS_CLIP_TYPE ] //, ::aStructure[ nIdx ][ MYSQL_FS_TYPE ]
聽 聽SWITCH cType
聽 聽 聽 CASE "L"
聽 聽 聽 聽 聽IF cField == NIL //.OR. Empty(cField) <------------------------ ACA SE COMENTA ANTES DEl .OR.
聽 聽 聽 聽 聽 聽 uValue := If( IS_NOT_NULL( ::aStructure[ nIdx ][ MYSQL_FS_FLAGS ] ), .F., cField )
聽 聽 聽 聽 聽ELSE
聽 聽 聽 聽 聽 聽 uValue := If( ValType( cField ) == "L", cField, !( Val( cField ) == 0 ) )
聽 聽 聽 聽 聽ENDIF
聽 聽 聽 聽 聽EXIT
聽 聽 聽 CASE "N"
聽 聽 聽 聽 聽IF cField == NIL //.OR. Empty(cField) <------------------------ ACA SE COMENTA ANTES DEl .OR.
聽 聽 聽 聽 聽 聽 uValue = If( IS_NOT_NULL( ::aStructure[ nIdx ][ MYSQL_FS_FLAGS ] ), 0, cField )
聽 聽 聽 聽 聽ELSE
聽 聽 聽 聽 聽 聽 uValue = If( ValType( cField ) == "N", cField, Val( cField ) )
聽 聽 聽 聽 聽ENDIF
聽 聽 聽 聽 聽EXIT
聽 聽 聽 CASE "D"
聽 聽 聽 聽 聽IF Empty( cField ) //.OR. Empty(cField) <------------------------ ACA SE COMENTA ANTES DEl .OR.
聽 聽 聽 聽 聽 聽 uValue = If( IS_NOT_NULL( ::aStructure[ nIdx ][ MYSQL_FS_FLAGS ] ), 聽CToD( "" ), cField )
聽 聽 聽 聽 聽ELSE
聽 聽 聽 聽 聽 聽 uValue := If( ValType( cField ) == "D", cField, SqlDate2Clip( cField ) )
聽 聽 聽 聽 聽ENDIF
聽 聽 聽 聽 聽EXIT
聽 聽 聽 CASE "M"
聽 聽 聽 聽 聽// we can not use PadR in 聽memo field
聽 聽 聽 聽 聽IF ( cField == NIL .OR. Empty(cField) )
聽 聽 聽 聽 聽 聽 uValue := ""
聽 聽 聽 聽 聽ELSE
聽 聽 聽 聽 聽 聽 uValue := cField
聽 聽 聽 聽 聽ENDIF
聽 聽 聽 聽 聽EXIT
聽 聽 聽 CASE "T"
聽 聽 聽 CASE "C"
聽 聽 聽 聽 聽IF D_SetPadRight()
聽 聽 聽 聽 聽 聽 nPad = Min( If( ::aStructure[ nIdx ][ MYSQL_FS_MAXLEN ] > ::aStructure[ nIdx ][ MYSQL_FS_LENGTH ],;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ::aStructure[ nIdx ][ MYSQL_FS_MAXLEN ], ::aStructure[ nIdx ][ MYSQL_FS_LENGTH] ), MAX_BLOCKSIZE )
聽 聽 聽 聽 聽ELSE
聽 聽 聽 聽 聽 聽 nPad = 0
聽 聽 聽 聽 聽ENDIF
聽 聽 聽 聽 聽IF ( cField == NIL .OR. Empty(cField) )
聽 聽 聽 聽 聽 聽 uValue = If( IS_NOT_NULL( ::aStructure[ nIdx ][ MYSQL_FS_FLAGS ] ), PadR(nPad), cField )
聽 聽 聽 聽 聽ELSE
聽 聽 聽 聽 聽 聽 uValue := PadR( cField, Max( Len( cField ), nPad ) )
聽 聽 聽 聽 聽ENDIF
聽 聽 聽 聽 聽EXIT
#ifdef __XHARBOUR__
聽 聽 聽 DEFAULT
#else
聽 聽 聽 OTHERWISE
#endif
聽 // 聽 聽 聽 uValue = cField
聽 聽 聽 ENDSWITCH
RETURN uValueotra cosa, has visto este post
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=27901&p=155778&hilit=carlos+vargas#p155778
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Carlos Vargas
Desde Managua, Nicaragua (CA)