Page 1 of 1

Incorrect field type - string vs. memo

Posted: 08.03.2007, 14:24
by matejka
Hi,
I use ZeosDBO 6.6.0 and I have a following problem: I use TZQuery to run command "SELECT p.note FROM (oper_premiums p) WHERE p.premid=100" and TDataSource with TDBGrid to display results.

When table name is in brackets that the field p.note is considered like memo and shown like memo in TDBGrid, so it's impossible to read the content. But when I remove the brackets it's correctly considered as string and it's readable in DBGrid. In the database the field is declared as varchar(255).

In this case I can remove the brackets without problems, but sometimes it's necessary to use them, eg. when I use several LEFT JOINs and more than one table in FROM clause. For example
SELECT somthing
FROM (tableA a, tableB b)
LEFT JOIN tableC c ON a.id=c.id
LEFT JOIN tableD d ON b.id=d.id
MySQL version 5.x doesn't allow to run such command without using brackets in FROM clause.

Previous version of Zeos I used (6.5.1) didn't have such problem. So is it a bug of new version?

thanks

Jiri Matejka

Posted: 08.03.2007, 23:06
by mdaems
Hi Matejka,

Is it possible to upgrade to 6.6.1? We did some fixes in this field, but I'm not sure your case is included.
If the problem still exists there, can you file a bug report on http://zeosbugs.firmos.at/ and attach a zip including a simple query and the corresponing data creation queries? I'm not sure we can easily fix it, but with this bug registration we do not forget about it and we can reproduce the problem whenever we want.

Mark

Posted: 09.03.2007, 09:50
by matejka
Hi Mark,
thanks for your reply, I'll check it out. I forgot to write that there is a dirty trick to avoid this problem using following query:
SELECT CONCAT(p.note,'')
FROM table
WHERE...

So it's enough to concat the field with empty string and than it is correclty considered like string not like memo.

I'll try the new version.

Jiri Matejka