distal-attribute
distal-attribute
distal-attribute
distal-attribute

dropdown menu of foreign key field: crazy problem

User, date Message
Written by krog
3 years ago
Category: General
5 posts since Fri, 10 Sep 10
I have a table with a column that is foreign key to a column within another table having numeric field. for some reasons, even if in the referred table I have 1200 entries, in the other table I can only choose 1055 entries from the dropdown menu, even if i digit 1055, that value is not accepted, if i paste the value then it accepted, but needless to say that i am really bothered by this problem! anybody who knows how to fix it?
Written by ansgar
3 years ago
4784 posts since Fri, 07 Apr 06
There is a hard limit of 1000 (not 1055) rows for this foreign key dropdown, so the query does not take longer time to finish. However, if there are more rows, then this drop down is automatically not displayed, and you should be able to enter any text data.
Written by krog
3 years ago
5 posts since Fri, 10 Sep 10
Is there any way to disable the dropdown menu? it is still there and prevents me from enter any number that is not in the list.
Written by ansgar
3 years ago
4784 posts since Fri, 07 Apr 06
Please read my above comment. If you would enter a different number the server would return some SQL error for the generated INSERT query as you are violating the foreign key constraint, wouldn't it? Again, the drop down is only displayed when there are less than 1000 unique values in the foreign column. This is to avoid large queries and to enable the user to enter any data by hand when there are more than 1000 rows.
Written by krog
3 years ago
5 posts since Fri, 10 Sep 10
ok i didn't explain properly. I can enter the value, say, 1200, if i copy and paste it into the column, instead if i type 1200, the value 12 is chosen from the dropdown menu, because, even if i have more than 1000 values in the foreign column, the dropdown menu is still displayed
Written by ansgar
3 years ago
4784 posts since Fri, 07 Apr 06
> even if i have more than 1000 values in the foreign column, the dropdown menu is still displayed

Can't believe that, at least not if you're using the latest build of HeidiSQL (some older build did that in fact as you describe it). So, which revision is it?
Written by krog
3 years ago
5 posts since Fri, 10 Sep 10
5.0.0.3272

so i guess i just have to update it?
Written by ansgar
3 years ago
4784 posts since Fri, 07 Apr 06
Exactly.
 

Please login to leave a reply, or register at first.