﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
320	Last row is not showed in a query with text	imendez	Javier Portugal	"Hi,

when using DBTable function, TolBase doesn´t show the last row of the resulting
set if fields contain some texts.
Let's see these examples:

Set Table01 = DBTable(""select 1,2 union all select 3,4 union all select 5,6"");
Set Table02 = DBTable(""select 'a','b' union all select 'c','d' union all select
'e','f'"");
Set Table03 = DBTable(""select 'a','b' union all select 'c','d'"");

The data of these 3 tables are absolutely correct. But, when you make a table
with TolBase, it doesn´t show the last row in the 'Table02' and 'Table03' cases.
I suppose it's because these two sets contain texts instead of numbers.

If the query has both text and number type fields, it seems to work right:
Set Table04 = DBTable(""select 'a',1 union all select 'b',2"");
Set Table05 = DBTable(""select 1,'a' union all select 2,'b'"");

If the query has date type fields, it also seems to work perfectly:
Set Table06 = DBTable(
""select str_to_date('20050102', '%Y%m%d'), str_to_date('20050103', '%Y%m%d')
 union all
 select str_to_date('20050104', '%Y%m%d'), str_to_date('20050105', '%Y%m%d')"");

But if the query has a mixture of rows, with number (or date) and text type
data, it works bad:
Set Table07 = DBTable(""select 1,2 union all select 'a','b'"");

So the error seems to be a query whose last row returned has, at least, a text
type data:

Set Table08 = DBTable(
""select str_to_date('20050102', '%Y%m%d'), str_to_date('20050103', '%Y%m%d')
 union all
 select 1,2
 union all
 select 'a','b'
 union all
 select 'b',2"");


Regards."	defect	closed	normal		Interface	head	normal	fixed		
