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:
parent
dc0f29de2c
commit
1c3f50eecd
@ -2570,10 +2570,10 @@ int TSystemisamfile::overwrite(
|
|||||||
nitems = ftell(fl);
|
nitems = ftell(fl);
|
||||||
fclose(fl);
|
fclose(fl);
|
||||||
|
|
||||||
err = _open_ex();
|
err = _open_ex(_excllock);
|
||||||
if (err != NOERR)
|
if (err != NOERR)
|
||||||
{
|
{
|
||||||
error_box("Impossibile aprire il file %d", _logicnum);
|
error_box("Impossibile aprire il file %d in modo esclusivo", _logicnum);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1509,28 +1509,24 @@ const TString& TMask::get(const char * fld_id) const
|
|||||||
|
|
||||||
long TMask::get_long(short fld_id) const
|
long TMask::get_long(short fld_id) const
|
||||||
{
|
{
|
||||||
// const TString& s = field(fld_id).get();
|
|
||||||
const TString& s = get(fld_id);
|
const TString& s = get(fld_id);
|
||||||
return atol(s);
|
return atol(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TMask::get_bool(short fld_id) const
|
bool TMask::get_bool(short fld_id) const
|
||||||
{
|
{
|
||||||
// const TString& s = field(fld_id).get();
|
|
||||||
const TString& s = get(fld_id);
|
const TString& s = get(fld_id);
|
||||||
return s.not_empty();
|
return s.full() && s != "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
real TMask::get_real(short fld_id) const
|
real TMask::get_real(short fld_id) const
|
||||||
{
|
{
|
||||||
// const TString& s = field(fld_id).get();
|
|
||||||
const TString& s = get(fld_id);
|
const TString& s = get(fld_id);
|
||||||
return real(s);
|
return real(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
TDate TMask::get_date(short fld_id) const
|
TDate TMask::get_date(short fld_id) const
|
||||||
{
|
{
|
||||||
// const TString& s = field(fld_id).get();
|
|
||||||
const TString& s = get(fld_id);
|
const TString& s = get(fld_id);
|
||||||
return TDate(s);
|
return TDate(s);
|
||||||
}
|
}
|
||||||
@ -1544,7 +1540,7 @@ TCurrency& TMask::get_currency(short fld_id, TCurrency& c) const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
real n(cf.get());
|
const real n(cf.get());
|
||||||
c.force_value("");
|
c.force_value("");
|
||||||
c.set_num(n);
|
c.set_num(n);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user