473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

DataSets in Child Forms

Couldn't I create DataSet in child forms????

Is there any solution for this???

Thanks in advance!

E.T.
Nov 15 '05 #1
4 1250
2003et,

You can create a data set anywhere like this:

// Create a data set.
DataSet pobjDataSet = new DataSet();

But it wouldn't provide you with much off the bat. What are you trying
to do, or what are you finding you can't do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"2003et" <e1*****@metu.edu.tr> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
Couldn't I create DataSet in child forms????

Is there any solution for this???

Thanks in advance!

E.T.

Nov 15 '05 #2
Hi Nicholas,

I am writing what exactly my situation is:

I first create a form and set it as mdicontainer, then, create a second form
and set its mdiparent property to first form. Now I have two forms, parent
and child form.

Now, I can create dataset in parent form as you said:
DataSet ds = new DataSet();

But I cannot create the dataset in the second form...
DataSet ds2 = new DataSet();

It gives error:
F:\Ruhsat\M1.cs(2429): The type or namespace name 'DataSet' could not be
found (are you missing a using directive or an assembly reference?)

using System.Data.SqlClient; is there and I can create sqlcommand for
example, but I cannot create DataTable or DataSet.

Please try it, on VS.NET 2002

Thanks....

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uP**************@tk2msftngp13.phx.gbl...
2003et,

You can create a data set anywhere like this:

// Create a data set.
DataSet pobjDataSet = new DataSet();

But it wouldn't provide you with much off the bat. What are you trying to do, or what are you finding you can't do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"2003et" <e1*****@metu.edu.tr> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
Couldn't I create DataSet in child forms????

Is there any solution for this???

Thanks in advance!

E.T.


Nov 15 '05 #3
2003et,

You will want to place the following at the head of your file:

using System.Data;

The DataSet class is located in the System.Data namespace, and this will
allow you to use the short notation for the DataSet class. Alternatively,
you can do this:

// Create the dataset.
System.Data.DataSet pobjDataSet = new System.Data.DataSet();

But you can see how this would get tedious.

Finally, make sure that you have a reference to System.Data.dll.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"2003et" <e1*****@metu.edu.tr> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
Hi Nicholas,

I am writing what exactly my situation is:

I first create a form and set it as mdicontainer, then, create a second form and set its mdiparent property to first form. Now I have two forms, parent
and child form.

Now, I can create dataset in parent form as you said:
DataSet ds = new DataSet();

But I cannot create the dataset in the second form...
DataSet ds2 = new DataSet();

It gives error:
F:\Ruhsat\M1.cs(2429): The type or namespace name 'DataSet' could not be
found (are you missing a using directive or an assembly reference?)

using System.Data.SqlClient; is there and I can create sqlcommand for
example, but I cannot create DataTable or DataSet.

Please try it, on VS.NET 2002

Thanks....

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:uP**************@tk2msftngp13.phx.gbl...
2003et,

You can create a data set anywhere like this:

// Create a data set.
DataSet pobjDataSet = new DataSet();

But it wouldn't provide you with much off the bat. What are you

trying
to do, or what are you finding you can't do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"2003et" <e1*****@metu.edu.tr> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
Couldn't I create DataSet in child forms????

Is there any solution for this???

Thanks in advance!

E.T.



Nov 15 '05 #4
Dear Nicholas,

Thank you so much!

I was about to get crazy!

Yes, you are right, I added using System.Data and it is ok now!

Thanks again!!!

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eD**************@TK2MSFTNGP11.phx.gbl...
2003et,

You will want to place the following at the head of your file:

using System.Data;

The DataSet class is located in the System.Data namespace, and this will allow you to use the short notation for the DataSet class. Alternatively,
you can do this:

// Create the dataset.
System.Data.DataSet pobjDataSet = new System.Data.DataSet();

But you can see how this would get tedious.

Finally, make sure that you have a reference to System.Data.dll.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"2003et" <e1*****@metu.edu.tr> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
Hi Nicholas,

I am writing what exactly my situation is:

I first create a form and set it as mdicontainer, then, create a second

form
and set its mdiparent property to first form. Now I have two forms, parent and child form.

Now, I can create dataset in parent form as you said:
DataSet ds = new DataSet();

But I cannot create the dataset in the second form...
DataSet ds2 = new DataSet();

It gives error:
F:\Ruhsat\M1.cs(2429): The type or namespace name 'DataSet' could not be
found (are you missing a using directive or an assembly reference?)

using System.Data.SqlClient; is there and I can create sqlcommand for
example, but I cannot create DataTable or DataSet.

Please try it, on VS.NET 2002

Thanks....

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote

in
message news:uP**************@tk2msftngp13.phx.gbl...
2003et,

You can create a data set anywhere like this:

// Create a data set.
DataSet pobjDataSet = new DataSet();

But it wouldn't provide you with much off the bat. What are you

trying
to do, or what are you finding you can't do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"2003et" <e1*****@metu.edu.tr> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
> Couldn't I create DataSet in child forms????
>
> Is there any solution for this???
>
> Thanks in advance!
>
> E.T.
>
>



Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Walt Borders | last post by:
Hi, My problem: Merging two datasets deletes parent elements, preserves all children. I've created two dataSets. Each use the same schema, parent-child nested tables. The first dataSet is...
3
by: Maheshkumar.R | last post by:
Hi groups, How i can command over the MDI CHIlD forms created dynamically at runtime from PARENT. Let say, i have generated 5 mdichild forms, but i want to work with child form1 from MDI...
4
by: Alpha | last post by:
I have a small Window application and through out the different forms I create a different dataset. At the begining I used the Tools to drag and drop the SqlDataAdapter, connection and dataset...
2
by: Jeff Brown | last post by:
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...
3
by: Lance | last post by:
I've noticed that controls that are contained in MDI child forms fail to raise MouseLeave events if the MDI child form's MdiParent property is set to Nothing (after it was set to an existing MDI...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
0
by: Chertzy B | last post by:
Datasets in Whidbey (Beta 2) contain a namespace property suggesting that it is possible to web enable them. However, it seems very difficult to do this. Take the following scenario 3...
9
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
0
by: Michael | last post by:
Okay, maybe I am missing something. I created a dataset through VS2005 data manager. The set includes tables with child relationships. The tables and the relationships are included in the dataset....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
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,...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.