Patch level : 12.0 972
Files correlati : ba8.exe f90.exe Commento : Corretta classe record sqlite: i datatype erano sempre sbagliati perche' presi dalla prima riga del set e quasi sempre i campi erano considerati real per i TVariant solitamente dovuto a un guessing di campi vuoti.
This commit is contained in:
parent
51c47f391d
commit
079d38d900
@ -453,32 +453,32 @@ int TSQL_recordset::on_get_items(int argc, char** values, char** columns)
|
|||||||
_column.add(info);
|
_column.add(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if (_items < _pagesize)
|
if (_items < _pagesize)
|
||||||
//{
|
{
|
||||||
// // Aggiusta le lunghezze dei campi testo e numerici
|
// Aggiusta le lunghezze dei campi testo e numerici
|
||||||
// for (int i = 0; i < argc; i++) if (values[i] && *values[i])
|
for (int i = 0; i < argc; i++) if (values[i] && *values[i])
|
||||||
// {
|
{
|
||||||
// TRecordset_column_info& info = (TRecordset_column_info&)_column[i];
|
TRecordset_column_info& info = (TRecordset_column_info&)_column[i];
|
||||||
// if (info._type == _alfafld || info._type == _realfld)
|
if (info._type == _alfafld || info._type == _realfld)
|
||||||
// {
|
{
|
||||||
// const int len = strlen(values[i]);
|
const int len = strlen(values[i]);
|
||||||
// if (len > info._width)
|
if (len > info._width)
|
||||||
// {
|
{
|
||||||
// info._width = len;
|
info._width = len;
|
||||||
// if (info._type == _alfafld)
|
if (info._type == _alfafld)
|
||||||
// {
|
{
|
||||||
// if (len == 8 && atol(values[i]) > 19000000)
|
if (len == 8 && atol(values[i]) > 19000000)
|
||||||
// {
|
{
|
||||||
// info._type = _datefld;
|
info._type = _datefld;
|
||||||
// info._width = 10;
|
info._width = 10;
|
||||||
// } else
|
}/* else
|
||||||
// if (real::is_real(values[i]))
|
if (real::is_real(values[i]))
|
||||||
// info._type = _realfld;
|
info._type = _realfld;*/
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
_items++;
|
_items++;
|
||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user