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
This commit is contained in:
guy 2011-01-26 09:20:47 +00:00
parent dc0f29de2c
commit 1c3f50eecd
2 changed files with 4 additions and 8 deletions

View File

@ -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;
}

View File

@ -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);
}