Binding a Table to a Combo Box for selection.

Hi,

I have looked for this (hopefully) simple procedure but have yet to find it so I’m asking now.

I have a Combobox and a mysql table called YearsProduced. The table has 2 columns. The ID and Year. I want to display the years for selection in a Combobox.

What I have done that gives me the first column only. Ignore the system prints they were just a quick way to see where I was getting to without going into debug.

            SQLContainer container = null;
            System.out.println("Client View 1");
			try {
				JDBCConnectionPool pool = new SimpleJDBCConnectionPool("com.mysql.jdbc.Driver", "jdbc:mysql://localhost:3306/buds", "userxxxx", "pwdxxxxxxx");
				[b]

TableQuery tq = new TableQuery(“YearsProduced”, pool);
[/b]

				tq.setVersionColumn("OPTLOCK");
				container = new SQLContainer(tq);
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e){
				System.out.println("ERROR: " + e.getMessage());
			}
			System.out.println("Client View 2");
            [color=#00ff55]

cbClientViewYr
[/color].setContainerDataSource(container);
System.out.println(“Client View 3”);

Any Ideas??? Thanks.