Modificate alcune segnalazioni, modificato il reference a TRectype
nella filtercursor() dei TSorted_cursor. git-svn-id: svn://10.65.10.50/trunk@3744 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
014f5bb943
commit
bc3439e40f
@ -1428,7 +1428,7 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
|
|||||||
int lf = (relation()->lfile(n).num());
|
int lf = (relation()->lfile(n).num());
|
||||||
TRectype r(lf);
|
TRectype r(lf);
|
||||||
abspos+=r.length(f.name());
|
abspos+=r.length(f.name());
|
||||||
CHECKD(abspos<=512,"Cannot exceed 512 bytes-key %d",abspos);
|
CHECKD(abspos<=256,"Cannot exceed 256 bytes-key %d",abspos);
|
||||||
}
|
}
|
||||||
|
|
||||||
_sort->init();
|
_sort->init();
|
||||||
@ -1544,7 +1544,8 @@ int TSorted_cursor::filtercursor(int pagecnt, TRecnotype* page)
|
|||||||
s.cut(s.len()-1);
|
s.cut(s.len()-1);
|
||||||
TFieldref f(s,0);
|
TFieldref f(s,0);
|
||||||
TString sf=f.read(*relation());
|
TString sf=f.read(*relation());
|
||||||
TFieldtypes fld_type = file(f.file()).curr().type(f.name());
|
TRectype& frec = file(f.file()).curr();
|
||||||
|
TFieldtypes fld_type = frec.type(f.name());
|
||||||
if (fld_type == _datefld) // Se il campo e' di tipo data, la converte in ANSI!
|
if (fld_type == _datefld) // Se il campo e' di tipo data, la converte in ANSI!
|
||||||
{
|
{
|
||||||
TDate d(sf);
|
TDate d(sf);
|
||||||
@ -1553,9 +1554,9 @@ int TSorted_cursor::filtercursor(int pagecnt, TRecnotype* page)
|
|||||||
if (is_up) sf.upper();
|
if (is_up) sf.upper();
|
||||||
TString fmt;
|
TString fmt;
|
||||||
if (fld_type == _alfafld || fld_type == _datefld)
|
if (fld_type == _alfafld || fld_type == _datefld)
|
||||||
fmt.format("%%-%ds",f.len(rec));
|
fmt.format("%%-%ds",f.len(frec));
|
||||||
else
|
else
|
||||||
fmt.format("%%%ds",f.len(rec));
|
fmt.format("%%%ds",f.len(frec));
|
||||||
strcat(Element.f,(const char*)sf.format((const char *)fmt,(const char *)sf));
|
strcat(Element.f,(const char*)sf.format((const char *)fmt,(const char *)sf));
|
||||||
}
|
}
|
||||||
Element.p=page[i];
|
Element.p=page[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user