From 54b14ed50fd30f2fd4c18ec17b7be66955d6944c Mon Sep 17 00:00:00 2001 From: Mindaugas Kavaliauskas Date: Wed, 29 Sep 2010 18:20:53 +0000 Subject: [PATCH] 2010-09-29 21:20 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/sddodbc/sddodbc.c ! fixed getting of empty string value. Thanks David Monta\~no for bug report ; Please, test --- harbour/ChangeLog | 6 ++++++ harbour/contrib/sddodbc/sddodbc.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a764b76197..bc1f0b1505 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-29 21:20 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + * harbour/contrib/sddodbc/sddodbc.c + ! fixed getting of empty string value. Thanks David Monta\~no for + bug report + ; Please, test + 2010-09-29 10:51 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbxbp/xbp3state.prg * contrib/hbxbp/xbpappevent.prg diff --git a/harbour/contrib/sddodbc/sddodbc.c b/harbour/contrib/sddodbc/sddodbc.c index e23819b575..f8e800a75a 100644 --- a/harbour/contrib/sddodbc/sddodbc.c +++ b/harbour/contrib/sddodbc/sddodbc.c @@ -631,7 +631,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, iTargetType, buffer, 0, &iLen ) ) ) { - if( iLen > 0 ) + if( iLen >= 0 ) { SQLPOINTER * val = ( SQLPOINTER * ) hb_xgrab( iLen + sizeof( O_HB_CHAR ) ); if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, iTargetType, val, iLen + sizeof( O_HB_CHAR ), &iLen ) ) )