Ignis2
asked on
Reusing the datatable instance created by default on bound controls
This is more of a general question and am posting this after searching through the IDE generated code and not being able to find what I need!
I have a form with bound controls (combo boxes mostly). When I added them, the IDE automatically created the table adapters (whose creation instances I can see in the designer code) and on the form load event added code of the kind I've posted here.
My question is, while I can find the table adapter instances, I cannot locate the instances of the datatable themselves - I would prefer to reuse what's already been created for submitting my updates rather than create a new one.
Any help pls?
Thanks,
I have a form with bound controls (combo boxes mostly). When I added them, the IDE automatically created the table adapters (whose creation instances I can see in the designer code) and on the form load event added code of the kind I've posted here.
My question is, while I can find the table adapter instances, I cannot locate the instances of the datatable themselves - I would prefer to reuse what's already been created for submitting my updates rather than create a new one.
Any help pls?
Thanks,
this.tblGroupsTableAdapter.Fill(this.dsSaphireOra.tblGroups);
ASKER
Umm, no. I do have the typed datasets - I'm not sure where the instance of these is being created and just how the plain thing works is a bit confusing!
Because, if I want to use it, I usually do something like
tblGroups tbl = new dsSaphireOra.tblGroups();
And I cannot find the instance being created anywhere - does the IDE create a default instance on running which is what is accessible from the this pointer?
Because, if I want to use it, I usually do something like
tblGroups tbl = new dsSaphireOra.tblGroups();
And I cannot find the instance being created anywhere - does the IDE create a default instance on running which is what is accessible from the this pointer?
If the above line is automatically added to the code then it means that its an instance. I am not sure if default instance concept applies here.
ASKER
Just to make things a little clearer, these are created when i bind the controls to the datatables. I can see instances of the table adapters being created :
tblGroupsTableAdapter = new dsSaphireOra.tblGroupsTabl eAdapter()
but can't find any reference to the datatables themselves. Any idea why? Am just trying to understand how this works, so I have better control over my code!
tblGroupsTableAdapter = new dsSaphireOra.tblGroupsTabl
but can't find any reference to the datatables themselves. Any idea why? Am just trying to understand how this works, so I have better control over my code!
ASKER
the lines of code I'm talking about are in the form.designer.cs - generated by the IDE!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://thetonesofillusion.blogspot.com/2009/04/vb-net-typed-and-untyped-dataset.html