|
im trying to re-arrange my database into classes. I have a DAClass that creates a dataset and fills it correctly.
Class DAClass
DataSet * FDs()
{
create dataAdapter;
create select command;
fill FDs;
Return FDs;
}
This part works fine i can then use the form to create a pointer to this.
DAClass * DA;
dataGrid->DataSource(DA->FDs());
this works fine also, the problem i have is updating the data from the datagrid. I have the following code but not sure if im going about this the right way.
Class DAClass
DataSet * UpdateDS(DataSet * Ds)
{
create adapter;
create update command;
update Ds;
return Ds;
}
then in the form call:
DA->UpdateDS(FDs);
but this part does not work it seems to just dispaly the same data, it is compiling and working but just not saving the correct items? can anyone point me in the right direction, thanks in advance...
-anf
|
|
|
|
|
|
|
|