close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 20 years ago

Closed 18 years ago

Last modified 13 years ago

#296 closed defect (fixed)

non-recognized types of fields in a query to MySql

Reported by: imendez Owned by: danirus
Priority: highest Milestone:
Component: DataBase Version: head
Severity: critical Keywords:
Cc:

Description

TOL doesn´t recognize a "count" operation as a real type data.
If you compile:

Text qry ="
select count(*)
from
(
select 'hola'
) t";
Set s = DBTable(qry);
Real r = s[1][1];
Text t = s[1][1];

You find the following error message:

Warning: (Funcion DBTable) La consulta debería devolver un texto, una fecha o un
número en el campo 1
ERROR: Tipos incompatibles en Element (ó [ ] ): es de tipo Text, pero no de
tipo Real.
ERROR: r no se pudo crear.

Change History (7)

comment:1 Changed 19 years ago by danirus

Hi Iván,

I need some information about the Database, and also I need some time to
configure my Windows in my very-old Pentium III to try the code. By now, please
tell me which RDBMS are you using? (MyQSL/Oracle/DB2...), and which version?

In advance I can inform you that your code works good under gnu/Linux using both
MySQL drivers, Tol-ODBC and Tol-MySQL Direct. Last sentence returns an error,
but nothing unexpected, I mean, it's not possible to convert from Real to Text.

Please tell me that data about your RDBMS.
Cheers, Daniel

comment:2 Changed 19 years ago by imendez

Now it works rigth. I think it could be related to bugs #294 and #295.

Regards.

comment:3 Changed 19 years ago by danirus

Resolution: duplicate
Status: newclosed

This bug was already fixed.

* This bug has been marked as a duplicate of bug 295 *

comment:4 Changed 18 years ago by Víctor de Buen Remiro

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/toldb/by_engine/common/Bugzilla/bug_000296

Due to problem could be extensible to other database engines, it has been added a new test to check it in all allowed engines

http://cvs.tol-project.org/viewcvs.cgi/tol_tests/toldb/by_engine/common/Bugzilla/bug_000296

comment:5 Changed 18 years ago by Víctor de Buen Remiro

Resolution: duplicate
Status: closedreopened

This is not a duplicate of 294 but it's fixed long time ago

comment:6 Changed 18 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: reopenedclosed

comment:7 Changed 13 years ago by Jorge

(In [4537]) fixes #1503, refs #1022,#983,#300,#296, BIGINT is returned as SQL_C_CHAR then converted to Real

Note: See TracTickets for help on using tickets.