I assume you already know how to connect to the database and you already have a DataSet containing the data from the database table. Put the code below in the OnShown event of the form
DataTable dt = dataSet1.Tables[0];
MainMenu menu = new MainMenu();
List<menuitem> list = new List<menuitem>();
foreach(DataRow row in dt.Rows)
{
MenuItem item = new MenuItem();
item.Text = row["menu_name"];
list.Add(item);
}
menu.MenuItems.Add("Products", list.ToArray());
this.Menu = MM;
</menuitem></menuitem>
I'm not very sure about the exact syntax, but with visual studio that shouldn't be a problem.