From 5c716b75fa9e7927580be631dd9efd2fcae79663 Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Wed, 9 May 2001 01:28:35 +0000 Subject: [PATCH] See ChangeLog entry 2001-05-08 21:30 UTC-0400 David G. Holm --- harbour/ChangeLog | 8 ++++++++ harbour/source/rtl/dbdelim.prg | 8 ++++++-- harbour/source/rtl/dbsdf.prg | 8 ++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5ab29d6057..320a74d112 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +2001-05-08 21:30 UTC-0400 David G. Holm + + * source/rtl/dbdelim.c + * source/rtl/dbsdf.c + % Corrected the initial database record positioning when using only + the ALL scope by itself or a FOR condition by itself to position + to the top of the database instead of record number 1. + 2001-05-09 00:02 UTC+1 JFL (mafact) * source/vm/classes.c * modified hb_msgclssel() to accept one logical param diff --git a/harbour/source/rtl/dbdelim.prg b/harbour/source/rtl/dbdelim.prg index c69b9cbc42..3948fd5d57 100644 --- a/harbour/source/rtl/dbdelim.prg +++ b/harbour/source/rtl/dbdelim.prg @@ -164,7 +164,7 @@ FUNCTION __dbDelim( lExport, cFile, cDelimArg, aFields, bFor, bWhile, nNext, nRe nCount := -1 ELSE // Followed by the FOR clause or the ALL clause. - nStart := 1 + nStart := 0 nCount := -1 END IF IF EMPTY( bFor ) @@ -191,7 +191,11 @@ FUNCTION __dbDelim( lExport, cFile, cDelimArg, aFields, bFor, bWhile, nNext, nRe ELSE IF nStart > -1 // Only reposition if a starting record was specified or implied. - GO (nStart) + IF nStart == 0 + GO TOP + ELSE + GO (nStart) + END IF END IF IF EMPTY( bWhile ) // This simplifies the looping logic. diff --git a/harbour/source/rtl/dbsdf.prg b/harbour/source/rtl/dbsdf.prg index 609a05daa1..927a2bde0e 100644 --- a/harbour/source/rtl/dbsdf.prg +++ b/harbour/source/rtl/dbsdf.prg @@ -149,7 +149,7 @@ FUNCTION __dbSDF( lExport, cFile, aFields, bFor, bWhile, nNext, nRecord, lRest ) nCount := -1 ELSE // Followed by the FOR clause or the ALL clause. - nStart := 1 + nStart := 0 nCount := -1 END IF IF EMPTY( bFor ) @@ -176,7 +176,11 @@ FUNCTION __dbSDF( lExport, cFile, aFields, bFor, bWhile, nNext, nRecord, lRest ) ELSE IF nStart > -1 // Only reposition if a starting record was specified or implied. - GO (nStart) + IF nStart == 0 + GO TOP + ELSE + GO (nStart) + END IF END IF IF EMPTY( bWhile ) // This simplifies the looping logic.