In the project I have db01.accdb database
db01DataSet is created by Add New DataSource Wizard in vs 2010.
I’m trying to add items to a DdropDownButton
private void Form1_Load(object sender, EventArgs e)
{
foreach (DataTable dt in db01DataSet.Tables) {
drop01.DropDownItems.Add(dt.TableName);
}}
Error: An object reference is required for the non-static field, method, or property
try to get table names from database : using this query
this will give all MS access table names…