Column with name "Extra" was not found
Moderators: gto, cipto_kh, EgonHugeist
Column with name "Extra" was not found
Hi there,
I got the error "Column with name "Extra" was not found" when I try to active any sql. I double check all my field names.
I starting to "trace" and discovery that the metadata was a field called Extra, but I am "stocked" in how to solve this issue.
The SQL is: SELECT * FROM MEMBERS
In a database called "my_db_design"
I am using MySQL 6.0.2 and dbo 6.6.1 - beta.
Sorry, but I already try everting without result, so I am asking for help.
Thanks,
Paty from Brazil.
I got the error "Column with name "Extra" was not found" when I try to active any sql. I double check all my field names.
I starting to "trace" and discovery that the metadata was a field called Extra, but I am "stocked" in how to solve this issue.
The SQL is: SELECT * FROM MEMBERS
In a database called "my_db_design"
I am using MySQL 6.0.2 and dbo 6.6.1 - beta.
Sorry, but I already try everting without result, so I am asking for help.
Thanks,
Paty from Brazil.
Hello Paty!
Hum.. Let's See:
- MySQL 6 don't have official support in Zeos
- 6.6.1 Beta isn't the latest version of Zeos.
About supporting MySQL 6, it's beta right now and I don't see any Zeos developer or contributor doing any job on beta releases of MySQL. If you want to dig in and adapt the changes, it's very easy to do it with Zeos.
About getting the latest version, which could help, or not, you can read right here, within SVN download:
http://zeos.firmos.at/viewtopic.php?t=1317
[]'s!
Hum.. Let's See:
- MySQL 6 don't have official support in Zeos
- 6.6.1 Beta isn't the latest version of Zeos.
About supporting MySQL 6, it's beta right now and I don't see any Zeos developer or contributor doing any job on beta releases of MySQL. If you want to dig in and adapt the changes, it's very easy to do it with Zeos.
About getting the latest version, which could help, or not, you can read right here, within SVN download:
http://zeos.firmos.at/viewtopic.php?t=1317
[]'s!
Hi GTO, thank you for the quick answer...
I already tried other versions, DBO 5.x and MySQL5.x too... but with the same error... So, this is why I stop in this versions after this try/error loop
My main skills are in HCI/CG programing... I just tring to do a simple file managemant system for my studio, but I still "stocked"... I choose MySQL just because it appers to be more friedly than Firebird, but maybe I have to go back and reconsider this fact... if get no answers...
In the link you send, the stable dbo versions are the same 6.6.1. On MySQL site, they report that the only real change was the inclusion of a new engine, other parts still the same...
Another fact that I don't report is that I am using InnoDB, but I change my table type to MyIsam (in fact, if I try w/ system's table too, that are MyIsam)and problem still.....
But I still tring, and how people says: "I am brasilian, I never give up"
Tkx,
I already tried other versions, DBO 5.x and MySQL5.x too... but with the same error... So, this is why I stop in this versions after this try/error loop
My main skills are in HCI/CG programing... I just tring to do a simple file managemant system for my studio, but I still "stocked"... I choose MySQL just because it appers to be more friedly than Firebird, but maybe I have to go back and reconsider this fact... if get no answers...
In the link you send, the stable dbo versions are the same 6.6.1. On MySQL site, they report that the only real change was the inclusion of a new engine, other parts still the same...
Another fact that I don't report is that I am using InnoDB, but I change my table type to MyIsam (in fact, if I try w/ system's table too, that are MyIsam)and problem still.....
But I still tring, and how people says: "I am brasilian, I never give up"
Tkx,
Hi mdaems,
Here is the result from the monitor:
2007-10-08 17:23:02 cat: Execute, proto: mysql-5, msg: SELECT * FROM MEMBERS E;
2007-10-08 17:23:02 cat: Execute, proto: mysql-5, msg: SHOW COLUMNS FROM my_db_design.members LIKE '%'
When I run this query (SHOW COLUMNS FROM my_db_design.members LIKE '%') in MySQL query Bronwer the result is:
Field, Type, Null, Key, Default, Extra
'MAKER_ID', 'int(10) unsigned', 'NO', 'PRI', '', 'auto_increment'
'NAME', 'varchar(16)', 'YES', '', '', ''
'CONTACT', 'varchar(16)', 'YES', '', '', ''
'PHONE', 'varchar(16)', 'YES', '', '', ''
So, we have a "Extra" column, but some get wrong after this point.
Some idea?
Here is the result from the monitor:
2007-10-08 17:23:02 cat: Execute, proto: mysql-5, msg: SELECT * FROM MEMBERS E;
2007-10-08 17:23:02 cat: Execute, proto: mysql-5, msg: SHOW COLUMNS FROM my_db_design.members LIKE '%'
When I run this query (SHOW COLUMNS FROM my_db_design.members LIKE '%') in MySQL query Bronwer the result is:
Field, Type, Null, Key, Default, Extra
'MAKER_ID', 'int(10) unsigned', 'NO', 'PRI', '', 'auto_increment'
'NAME', 'varchar(16)', 'YES', '', '', ''
'CONTACT', 'varchar(16)', 'YES', '', '', ''
'PHONE', 'varchar(16)', 'YES', '', '', ''
So, we have a "Extra" column, but some get wrong after this point.
Some idea?
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hi,
Can you please put a debug point in TZMySQLDatabaseMetadata.GetColumns
at line and debug the execution of the GetStringByName function?
It loops through the resultset of the Show Columns statement and should find the Extra column but doesn't in your case. Can you find out why not? (What columns do exist, ...)
I still suppose you have this problem for all queries?
BTW : I think commenting out the line mentioned above should solve your problem as it's just 'additional information' concerning the columns.
Ohoh. No, that's not true. This column is also needed to detect autoincrement columns... As long as ou don't need this info to be correct everything should work when you also comment out some lines lower :
(ie. if you don't insert rows without filling the autoincrement column)
Can you please put a debug point in TZMySQLDatabaseMetadata.GetColumns
at line
Code: Select all
Result.UpdateString(12, GetStringByName('Extra'));
It loops through the resultset of the Show Columns statement and should find the Extra column but doesn't in your case. Can you find out why not? (What columns do exist, ...)
I still suppose you have this problem for all queries?
BTW : I think commenting out the line mentioned above should solve your problem as it's just 'additional information' concerning the columns.
Ohoh. No, that's not true. This column is also needed to detect autoincrement columns... As long as ou don't need this info to be correct everything should work when you also comment out some lines lower :
Code: Select all
Result.UpdateBooleanByName('AUTO_INCREMENT',
Trim(LowerCase(GetStringByName('Extra'))) = 'auto_increment');
Hi there,
Mdaems I try what you said, and discovery that:
When we get columns from the table:
SHOW COLUMNS FROM members LIKE '%'
We get six fields:
Field, Type, Null, Key, Default, Extra
But in the GetColumnCount says that are only five:
With this result (5), the GetColumnIndex cause a exception, because we get "zero" as result, since we never reach the last field "Extra", that are the 6º field:
So, I bilieve that something still wrong... but it become a little deep for me as a beginer in db development... I still needing your help guys...
Some that ocours to me is the fact that maybe I doing some wrong with the settings...
I saw in code that there's some itens
that I dont set, like Catalog and SchemaPattern, and maybe this can cause this errors... Am I wrong???
Sadeqn, can you show me where did you put the try-except handler to avoid this? ... It´s not clear for me.
I still believe that we are very near to solve this issue...
Mdaems I try what you said, and discovery that:
When we get columns from the table:
SHOW COLUMNS FROM members LIKE '%'
We get six fields:
Field, Type, Null, Key, Default, Extra
But in the GetColumnCount says that are only five:
Code: Select all
//ZDbcResultSetMetadata
function TZAbstractResultSetMetadata.GetColumnCount: Integer;
begin
Result := FResultSet.ColumnsInfo.Count;
end;
Code: Select all
function TZAbstractResultSet.GetColumnIndex(const ColumnName: string): Integer;
begin
Result := FindColumn(ColumnName); // none found!!!
if Result < 1 then
raise EZSQLException.Create(Format(SColumnWasNotFound, [ColumnName]));
end;
Some that ocours to me is the fact that maybe I doing some wrong with the settings...
I saw in code that there's some itens
Code: Select all
Key := Format('get-columns:%s:%s:%s:%s',
[Catalog, SchemaPattern, TableNamePattern, ColumnNamePattern]);
Sadeqn, can you show me where did you put the try-except handler to avoid this? ... It´s not clear for me.
I still believe that we are very near to solve this issue...
My test show that this exception raise when have not any special field (this means all of record have empty result for Extra field)
I use this code in ZDbcMySqlMetadata:
and
And it seems all things is ok! but this is not clean code :-(
I use this code in ZDbcMySqlMetadata:
Code: Select all
try
Result.UpdateString(12, GetStringByName('Extra'));
except
Result.UpdateString(12, '');
end;
Code: Select all
try
Result.UpdateBooleanByName('AUTO_INCREMENT',
Trim(LowerCase(GetStringByName('Extra'))) = 'auto_increment');
except
Result.UpdateBooleanByName('AUTO_INCREMENT',False);
end;
Hi there,
I tried the code suggested, but the code bellow still raise the exception, because the return value is "zero".
When I "disable" this check, I get others erros (range check), in the column index.
Anyone have some idea if a "wrong" charset/collat settings can generate this errors?
BTW, some brazilian member, can send me the correct/or usual charset/collate? I am using latin1 w/ latin1_general_ci in InnoDB tables.
I tried the code suggested, but the code bellow still raise the exception, because the return value is "zero".
Code: Select all
function TZAbstractResultSet.GetColumnIndex(const ColumnName: string): Integer;
begin
Result := FindColumn(ColumnName);
if Result < 1 then
raise EZSQLException.Create(Format(SColumnWasNotFound, [ColumnName]));
end;
Anyone have some idea if a "wrong" charset/collat settings can generate this errors?
BTW, some brazilian member, can send me the correct/or usual charset/collate? I am using latin1 w/ latin1_general_ci in InnoDB tables.
Hi Guys,
I was little busy this days...
I did some "tracking" and get this:
There are 6 columns: Field, Type, Null, Key, Default, Extra
When the loop start, the FindColumn function runs over the fields 'Field','Type','Null','Default' and 'Extra', but as I said, the 'GetColumnCount' function returns 5... and the error remains.
I did some tests @ home with personnal Delphi7 and it's become more 'odd', because it´s stays with the same error, but it works on design time when I activate the query , but not when I try to run it.
I did this tests with the "Controls" exemple that are embedded in distribution.
But I have one , maybe some one can send me a compiled version of Controls example, so I can try it and see if works or are something external to the binary program (I mean, in conector/MySql).
Could someone send me this?
Thanks for now
I was little busy this days...
I did some "tracking" and get this:
There are 6 columns: Field, Type, Null, Key, Default, Extra
When the loop start, the FindColumn function runs over the fields 'Field','Type','Null','Default' and 'Extra', but as I said, the 'GetColumnCount' function returns 5... and the error remains.
I did some tests @ home with personnal Delphi7 and it's become more 'odd', because it´s stays with the same error, but it works on design time when I activate the query , but not when I try to run it.
I did this tests with the "Controls" exemple that are embedded in distribution.
But I have one , maybe some one can send me a compiled version of Controls example, so I can try it and see if works or are something external to the binary program (I mean, in conector/MySql).
Could someone send me this?
Thanks for now