dada_gwapz
March 18th, 2008, 09:14 PM
hi...
i'm using MS Access 2003 and VS 2005... and i'm having a problem with columns...
i have a code for adding a new column. it's under a button event handler. here it is:
DataColumn ^dc = gcnew DataColumn("columnname",System::Type::GetType("System.String"));
DataSetName->Tables["tablename"]->Columns->Add(dc);
there are no build errors. during run time, once i click the button, the column won't appear.
i also tried this code... using the DataGridView property...
DataGridView->Column->Add("columnname","columnheader");
this time, the new column will appear on the data grid...
i don't know if their both the same... if they are, then my problem now is saving and including the added column to the database... is this even possible? 'coz i doubt it... it would mean that you have re-establish the connection the data source . . . right? anyway, hope there's a solution...
please help
i'm using MS Access 2003 and VS 2005... and i'm having a problem with columns...
i have a code for adding a new column. it's under a button event handler. here it is:
DataColumn ^dc = gcnew DataColumn("columnname",System::Type::GetType("System.String"));
DataSetName->Tables["tablename"]->Columns->Add(dc);
there are no build errors. during run time, once i click the button, the column won't appear.
i also tried this code... using the DataGridView property...
DataGridView->Column->Add("columnname","columnheader");
this time, the new column will appear on the data grid...
i don't know if their both the same... if they are, then my problem now is saving and including the added column to the database... is this even possible? 'coz i doubt it... it would mean that you have re-establish the connection the data source . . . right? anyway, hope there's a solution...
please help