From 1c3f50eecd09f27aca06777b6a97204182907033 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 26 Jan 2011 09:20:47 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : ba1.exe Ricompilazione Demo : [ ] Commento : Aggiunto lock escluviso anche in TSystemisamfile::overwrite e non solo in ::load git-svn-id: svn://10.65.10.50/branches/R_10_00@21512 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/isam.cpp | 4 ++-- include/mask.cpp | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/isam.cpp b/include/isam.cpp index 1e6047343..af9f90875 100755 --- a/include/isam.cpp +++ b/include/isam.cpp @@ -2570,10 +2570,10 @@ int TSystemisamfile::overwrite( nitems = ftell(fl); fclose(fl); - err = _open_ex(); + err = _open_ex(_excllock); if (err != NOERR) { - error_box("Impossibile aprire il file %d", _logicnum); + error_box("Impossibile aprire il file %d in modo esclusivo", _logicnum); return err; } diff --git a/include/mask.cpp b/include/mask.cpp index 76a1d131e..9d223a676 100755 --- a/include/mask.cpp +++ b/include/mask.cpp @@ -1509,28 +1509,24 @@ const TString& TMask::get(const char * fld_id) const long TMask::get_long(short fld_id) const { -// const TString& s = field(fld_id).get(); const TString& s = get(fld_id); return atol(s); } bool TMask::get_bool(short fld_id) const { -// const TString& s = field(fld_id).get(); const TString& s = get(fld_id); - return s.not_empty(); + return s.full() && s != "0"; } real TMask::get_real(short fld_id) const { -// const TString& s = field(fld_id).get(); const TString& s = get(fld_id); return real(s); } TDate TMask::get_date(short fld_id) const { -// const TString& s = field(fld_id).get(); const TString& s = get(fld_id); return TDate(s); } @@ -1544,7 +1540,7 @@ TCurrency& TMask::get_currency(short fld_id, TCurrency& c) const } else { - real n(cf.get()); + const real n(cf.get()); c.force_value(""); c.set_num(n); }