Closed oliwe closed 9 months ago
Hi, can you provide an reproducible example? I tried with this, and worked:
CREATE TABLE table_name
(
"E/I MLA" integer
);
Yes - I have the table created and I am working with the table since a log time :-) What does not work is if I do a right click on the table and choose "Browse data" then the SELECT statement is not build correctly. A linebreak is introduced after E/I. This leads to the SQL error code = -206
Replacing the linebreak manually fixes the problem. If I copy the select statement in my notepad++ and enable "Show everything" I can see CRLF behind E/I - and this is wrong. In my case the variable is a float.
This problem was not in the 0.9.3 version I used before.
If you try to recreate this column in a new table, you get the same problem? (please don't copy and paste, retype manually the column name) Also if yes, can you send me a step-by-step to try here? Because I'm unable to reproduce here Also, which Fb version are you using? Can you provide the output of this SQL?
select
BASE64_ENCODE(trim(f.RDB$FIELD_NAME)), --remove this line if Fb <= 3.0
f.* from RDB$RELATION_FIELDS f
where f.RDB$RELATION_NAME=:yourtable
and f.RDB$FIELD_NAME=:yourProblematicColumn
I removed the column and readded it. Same problem. Firebird 3.0.10.33601 But it looks like a probem in flamerobin - as I wrote ealier "just" the SELECT statement is wrong. By manually replacing the linebreak with a space fixes the problem:
select BASE64_ENCODE(trim(f.RDB$FIELD_NAME)), f.* from RDB$RELATION_FIELDS f where f.RDB$RELATION_NAME=:"yct_parenchyma" and f.RDB$FIELD_NAME=:"E/I MLA"
results in
Error: IBPP::LogicException
Context: Statement::FindParamsByName
Message: Parameter name
BTW When I do a right click on the table "yct_parenchyma" then "Generate Code" and then "SELECT ... from yct_parenchma where ..." and I choose "E/I MLA" then flamerobin generates
SELECT a."E/I MLA" FROM "yct_parenchyma" a ;
and this works :-)
So the problem only occures if the whole table should be shown - maybe a length problem?
where f.RDB$RELATION_NAME=:"yct_parenchyma" and f.RDB$FIELD_NAME=:"E/I MLA"
remove ":", its for passing as parameter
Also, can you pass me the DDL from this table?
Right click->Generate Code->Extract full DLL for table
select BASE64_ENCODE(trim(f.RDB$FIELD_NAME)), f.* from RDB$RELATION_FIELDS f where f.RDB$RELATION_NAME="yct_parenchyma" and f.RDB$FIELD_NAME="E/I MLA"
gives me
Dynamic SQL Error SQL error code = -206 Column unknown E/I MLA At line 5, column 22
try using single quote
select
BASE64_ENCODE(trim(f.RDB$FIELD_NAME)),
f.* from RDB$RELATION_FIELDS f
where f.RDB$RELATION_NAME='yct_parenchyma'
and f.RDB$FIELD_NAME='E/I MLA' --if needed, remove this line
Could replicate here, I'll take a look ASAP
found the bug, tricky one :)
when there is a case where the SQL extrapolates the (default) 80 max char col size, and a word with space is wrapped with a quote, and you are in the second line, it'll wrongly wrap to the third line breaking the quoted string
try the latest snapshot build from here: https://github.com/mariuz/flamerobin/actions/runs/7715391998
I tested the snapshot - the problem seems to be solved. Thank you for the quick bug fix :-)
Just upgraded from version 0.9.3 to 0.9.10. In the new Version a bug in the "Browse data" funktionality is introduced. The problem is a field variable with a space in it: "E/I MLA" - this was never a problem in previous versions of flamerobin. Now when creating the SELECT call, a space is converted into a linebreak. Manually replacing the linebreak with a space fixes the problem.