Multiple forms one dataconnection and one dataset - Newbie

  • Thread starter Thread starter Elizabeth Strachan
  • Start date Start date
E

Elizabeth Strachan

To do this you need to declare the dataset as "public" on
the mdiform (c#) or alternatively use get/set to get to
it.
Then on the child form to get a reference to the dataset
do this:

DataTable dt = ((MainForm)this.MdiParent).MyDataTable;

MainForm should be replaced with the name of your parent
form and MyDataTable should be replaced with the name of
your datatable.

If you are a VB person then don't quote me but I think
public is Shared in vb and to cast you use CType or
something like that. I also think "this" is "me" in vb.

Clear as mud?

Sincerely,
Elizabeth Strachan
 
Back
Top