B
Brian
Thanks for the help again!
Went onto that link and corrected my connection string but don't think
Visual Studio liked the format of it.
I have the exact same connection string to fill up a ListBox elsewhere
and that works so i don't know why i'd need a different connection
string here.
Anyways.. here's my entire code (connection string at top - the
photoDB.mdb database is in the project's Debug folder)
---------------------------------------------------------
// load categories
string strDSN = "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=photoDB.MDB";
string strSQL = "SELECT * FROM categories" ;
OleDbConnection conn = new OleDbConnection(strDSN);
OleDbDataAdapter da = new OleDbDataAdapter(strSQL,conn);
DataSet ds = new DataSet();
da.Fill(ds);
cboCategory.DataSource = ds.Tables[0];
cboCategory.DisplayMember = "category"; //name of field you want to
display
Went onto that link and corrected my connection string but don't think
Visual Studio liked the format of it.
I have the exact same connection string to fill up a ListBox elsewhere
and that works so i don't know why i'd need a different connection
string here.
Anyways.. here's my entire code (connection string at top - the
photoDB.mdb database is in the project's Debug folder)
---------------------------------------------------------
// load categories
string strDSN = "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=photoDB.MDB";
string strSQL = "SELECT * FROM categories" ;
OleDbConnection conn = new OleDbConnection(strDSN);
OleDbDataAdapter da = new OleDbDataAdapter(strSQL,conn);
DataSet ds = new DataSet();
da.Fill(ds);
cboCategory.DataSource = ds.Tables[0];
cboCategory.DisplayMember = "category"; //name of field you want to
display