Quantcast
Channel: FiveTech Software tech support forums
Viewing all articles
Browse latest Browse all 26233

Versão atual TDOLPHIN - Campo Null

$
0
0
Carlos, muito obrigado por responder. Meu amigo, eu tentei localizar a diferença entre os dois códigos(CARLOS e bitbucket.org). Eu não achei diferença, veja: [quote:1okj6pnm] please, replace in tdolqry.prg, recompile and test. METHOD GetRow( nRow ) CLASS TDolphinQry LOCAL cType, uValue, cField LOCAL cCol LOCAL nIdx LOCAL aRow LOCAL hRow, uItem, aStructure, nPad DEFAULT nRow TO ::nRecNo IF ::hResult <> NIL DO CASE CASE ::nRecCount < 1 ::lBof := .t. ::lEof := .t. ::nRecNo := 1 CASE nRow > 0 .and. nRow <= ::nRecCount ::lBof := .f. ::lEof := .f. ::nRecNo := Max( nRow, 1 ) CASE nRow > ::nRecCount ::lBof := .f. ::lEof := .t. ::nRecNo := ::nRecCount CASE nRow < 1 ::lBof := .t. ::lEof := .f. ::nRecNo := 1 ENDCASE nRow := ::nRecNo MySqlDataSeek( ::hResult, nRow - 1 ) aRow := MySqlFetchRow( ::hResult ) ::aRowOriginal := aRow #ifndef USE_HASH ::aRow := Array( Len( aRow ) ) ::aOldRow := Array( Len( aRow ) ) #endif /*USE_HASH*/ //fill ::aRow Info IF !HB_IsNil( aRow ) .AND. ::nRecCount > 0 // Convert answer from text field to correct clipper types FOR EACH cField IN aRow #ifdef __XHARBOUR__ nIdx := HB_EnumIndex() #else nIdx := cField:__EnumIndex() #endif uValue := ::VerifyValue( nIdx, cField ) ::SetData( nIdx, uValue ) NEXT ELSE IF useClipperDefaultValue() aStructure := ::aStructure FOR EACH uItem IN aStructure #ifdef __XHARBOUR__ nIdx := HB_EnumIndex() #else nIdx := uItem:__EnumIndex() #endif cType := uItem[ MYSQL_FS_CLIP_TYPE ] SWITCH cType CASE "M" // we can not use PadR in memo field IF !HB_IsNil( uItem[ MYSQL_FS_DEF ] ) uValue := uItem[ MYSQL_FS_DEF ] ELSE uValue := "" ENDIF EXIT CASE "C" IF D_SetPadRight() nPad := Min( IIf( uItem[ MYSQL_FS_MAXLEN ] > uItem[ MYSQL_FS_LENGTH ],; uItem[ MYSQL_FS_MAXLEN ], uItem[ MYSQL_FS_LENGTH] ), MAX_BLOCKSIZE ) ELSE nPad := 0 ENDIF IF !HB_IsNil( uItem[ MYSQL_FS_DEF ] ) uValue := PadR( uItem[ MYSQL_FS_DEF ], Max( Len( uItem[ MYSQL_FS_DEF ] ), nPad ) ) ELSE uValue := Space( nPad ) ENDIF EXIT CASE "N" CASE "I" IF !HB_IsNil( uItem[ MYSQL_FS_DEF ] ) uValue := Val( uItem[ MYSQL_FS_DEF ] ) ELSE uValue := 0 ENDIF EXIT CASE "L" IF !HB_IsNil( uItem[ MYSQL_FS_DEF ] ) uValue := ( uItem[ MYSQL_FS_DEF ] == "1" ) ELSE uValue := .f. ENDIF EXIT CASE "D" IF !HB_IsNil( uItem[ MYSQL_FS_DEF ] ) uValue := SqlDate2Clip( uItem[ MYSQL_FS_DEF ] ) ELSE uValue := CToD("") ENDIF EXIT #ifdef __XHARBOUR__ DEFAULT #else OTHERWISE #endif uValue := NIL END ::SetData( nIdx, uValue ) NEXT ENDIF ENDIF #ifndef NOINTERNAL ELSE ::oServer:nInternalError := ERR_FAILEDGETROW ::nRecNo := 0 ::CheckError() #endif ENDIF RETURN ::nRecNo[/quote:1okj6pnm]

Viewing all articles
Browse latest Browse all 26233

Trending Articles