OK i removed all of my datasets to start fromo scratch again with another
method.
Is there a way i can create all my datasets in the MDI Parent form and
reference them from child forms
*******************
for instance i just created dsName1 in the MDi Parent and the dsName.xsd was
created in the solution.
Now i want 2 different child forms to be able to access certain data
contained in the dsname1 dataset.
they would probably work if i could reference the source dataset correctly.
childDsName = dsName1.Copy()
childDsName = formMain.dsName1.Copy()
childDsName = SolutionName.dsName1.Copy()
that should give me the structure and the data ,clone gives only the
structure
*******************
Now if i get that part working.. then to keep them updated i could put this
is the main windows "changeactivechild" (the same place where it updates the
mdilist on the menu) so that if i enter data from one form into the dataset
the other form can already access it
childDsName = dsName1.getchanges()
childDsName = formMain.dsName1.getchanges()
childDsName = SolutionName.dsName1.getchanges()
*******************
then on the childs form close so that it updates the dsName1 in the Parent?
childDsName.Merge(dsName1, True, System.Data.MissingSchemaAction.Add)
*******************
Is any of this close to being right????? If i solve this problem i think i
could be busy for a few days and just read posts , LOL.
If i could bind child form controls to the dataset on the parent i wouldn't
need to make a copy at all
so glad i found this newsgroup, i have given up trying to do this project
about 3 times in the past 3 months but i keep trying and get a little
farther only to realize i need to start over and do it a different way.
Thanks guys,
Jeff Brown 2 1378
Jeff,
Sorry I got caught in meetings yesterday but I'll do my best to answer your
questions here.
"Jeff Brown" <no******@thistime.com> wrote in message
news:gb*******************@twister.austin.rr.com.. . OK i removed all of my datasets to start fromo scratch again with another method.
Is there a way i can create all my datasets in the MDI Parent form and reference them from child forms ******************* for instance i just created dsName1 in the MDi Parent and the dsName.xsd
was created in the solution.
Now i want 2 different child forms to be able to access certain data contained in the dsname1 dataset. they would probably work if i could reference the source dataset
correctly. childDsName = dsName1.Copy() childDsName = formMain.dsName1.Copy() childDsName = SolutionName.dsName1.Copy()
^^^ Are these formMain and SolutionName instance variables? I didn't even
know you could reference something by solution name (if I'm wrong, someone
tell me).
No... No you can't... =)
Second of all, with formMain, I'm not positive but this looks like a Shared
reference, in which case that could be right, but I don't know if you have
it set up right.
in your childform I would do
dim tform as mdiMainForm (whatever the type is)
tForm = me.mdiParent
me.dsWhatever.merge (tForm.dsName1)
then when your child form closes or you want to do somethign to merge the
changes back in call your parent form to merge the child form... you could
do this on your form unload or whatever of your child
Dim tForm as mdiMainForm
tForm = me.mdiParent
tForm.dsName1.Merge (me.dsWhatever)
and then you can call your update logic. You could also do this with
events... But lets just stick with one thing at a time for right now.
Events may be better (basically pass the updated row back through a delegate
(then you also will be thread safe if you turn it into multi-threading...
thats a fun time)).
that should give me the structure and the data ,clone gives only the structure ******************* Now if i get that part working.. then to keep them updated i could put
this is the main windows "changeactivechild" (the same place where it updates
the mdilist on the menu) so that if i enter data from one form into the
dataset the other form can already access it childDsName = dsName1.getchanges() childDsName = formMain.dsName1.getchanges() childDsName = SolutionName.dsName1.getchanges()
This is good... use this in with what I showed you above... also, if you try
to merge an empty dataset (because getChanges was empty) you'll get an
error.
******************* then on the childs form close so that it updates the dsName1 in the
Parent? childDsName.Merge(dsName1, True, System.Data.MissingSchemaAction.Add)
yep yep
*******************
Is any of this close to being right????? If i solve this problem i think i could be busy for a few days and just read posts , LOL.
Yeah this will take care of a lot of it. there are a lot of methods for
doing something like this. This is just one of them. Events are pretty
powerful too, in which case you can just let VB.NET take care of al ot of
the dirty work (so your not constantly declaring instances of forms and
datasets etc.)
hope it helps some more.
CJ
If i could bind child form controls to the dataset on the parent i
wouldn't need to make a copy at all
so glad i found this newsgroup, i have given up trying to do this project about 3 times in the past 3 months but i keep trying and get a little farther only to realize i need to start over and do it a different way.
Welcome to programming. I constantly want to do projects over.
Thanks guys, Jeff Brown
Paul_IV
1.Declare DataSet in the Module (as Friend).
2.Fill up the instance of the DataSet (as Friend) with DataAdapters on
your Parent Form.
3.Reference your child forms directly to Parent forms Dataset.
4.For Updates on child forms use child form DataAdapters.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jack Notarangelo |
last post by:
Hello,
I hope someone can help me with this. I add datasets to an
aspx page by generating them from sql data adapters.
However, they tend to disappear on me as soon as I go into
the .cs page...
|
by: cody |
last post by:
I've seen an Introduction on ADO.NET with its Datasets on .NET TV and Iam
now wondering how it is realized/used in real world applications.
I don't believe that one would create a dataset and add...
|
by: malcolm |
last post by:
Hello,
We have a robust (.NET 1.1 c# winforms) client-server application that
utilizes many typed DataSets, typed DataTables and typed DataRows. Our
application is a series of windows and popup...
|
by: Bj?rn Mor?n |
last post by:
I am consuming a web service that returns arrays of classes which can
contain other classes (a hierarchy of data). Is there a simple way to
move the data into a typed DataSet without writing too...
|
by: TJoker .NET |
last post by:
I'm developing an VB.NET Windows Forms application that uses CR for VS.NET
(original version shipped with VS.NET 2002 - my VS.NET has the latest SP
installed, no SPs for CR).
My reports get their...
|
by: David Colliver |
last post by:
Hi,
using c#, 1.1
I know that we are not supposed to use global variables etc. in c#
I am having a problem, but not sure how to resolve. I did have another post
here, but may have over...
|
by: Penelope Dramas |
last post by:
Hello,
I'm in a front of very serious .net redesign/rewrite of an old VB6
application.
I had been asked to make it .NET 2.0 and would like to ask couple of
questions regarding data access as...
|
by: Peter Bradley |
last post by:
Hi all,
This post is sort of tangentially related to my earlier posts on
configuration files for DLLs.
Does anyone know how to create typed DataSets using VS2005's new DataSet
designer, but...
|
by: gardnern |
last post by:
We have X number of data sets, of Y length each.
For example...
Small, Medium, Large
and
Red, Green, Blue, Yellow
We need to generate a list of all possibilities
Small Red
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |