I forgot to mention, you should also remove the OnSelect code of the dropdown--there's no need to do anything when the drop down is selected.
1. What line is it highlighting?
2. No, you have a table, there's 2406 lines. Some of those lines have null values for certain fields but every column has 2406 lines because columns are part of the table.
My guess is that you haven't laid our your table properly. A database isn't a spreadsheet. I suggest you read up on normalization (
https://en.wikipedia.org/wiki/Database_normalization) and structure your tables properly. I bet your field names in Gen shouldn't be field names, but instead should be values in a field.
Suppose you had a table to hold foods and their types. You wouldn't store it like this:
ID, Meat, Vegetable, Fruit
1, Beef, Potatoes, Tomatoes
2, Chicken, Lettuce, Apples
3, Pork, , Oranges
4, Shrimp, ,
Instead you would use this structure moving the food types from field names to values in the table:
ID, Food, FoodType
1, Beef, Meat
2, Potatoes, Vegetable
3, Tomatoes, Fruit
4, Chicken, Meat
5, Lettuce, Vegetable
6, Apples, Fruit
7, Pork, Meat
8, Oranges, Fruit
9, Shrimp, Meat
I believe your field names should be in the table itself describing the type of value associated with it. Looks like your other table isn't structure properly either. Again, read up on normalization.