473,320 Members | 1,817 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,320 software developers and data experts.

Dataset

vb.net 2003 & SQL2005

when opening a form i greate a dataset and add a table to it, what im
trying to find out is the best way to destroy the dataset when i close the
form

any ideas?
Aug 9 '06 #1
5 2010
Peter,

There are in the system.data (adonet) no unmanaged resources. Therefore it
will be destroyed by the GC after that you have closes your program. Or do
you mean something else with your question?

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in bericht
news:FA**********************************@microsof t.com...
vb.net 2003 & SQL2005

when opening a form i greate a dataset and add a table to it, what im
trying to find out is the best way to destroy the dataset when i close the
form

any ideas?

Aug 9 '06 #2
Cor, i was hoping to be able to destroy it after i close the form. The
dataset is recreated with freash data if the operator goed in to that
sectoion of the application again

i have tried ther .dispose option when closing the form but tht hasnt worked

"Cor Ligthert [MVP]" wrote:
Peter,

There are in the system.data (adonet) no unmanaged resources. Therefore it
will be destroyed by the GC after that you have closes your program. Or do
you mean something else with your question?

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in bericht
news:FA**********************************@microsof t.com...
vb.net 2003 & SQL2005

when opening a form i greate a dataset and add a table to it, what im
trying to find out is the best way to destroy the dataset when i close the
form

any ideas?


Aug 9 '06 #3
Peter,

Why will you destroy it, as it will be destroyed?

If closing the form is not closing the main form, than it is another
situation.
Is it that?

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in bericht
news:5D**********************************@microsof t.com...
Cor, i was hoping to be able to destroy it after i close the form. The
dataset is recreated with freash data if the operator goed in to that
sectoion of the application again

i have tried ther .dispose option when closing the form but tht hasnt
worked

"Cor Ligthert [MVP]" wrote:
>Peter,

There are in the system.data (adonet) no unmanaged resources. Therefore
it
will be destroyed by the GC after that you have closes your program. Or
do
you mean something else with your question?

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in bericht
news:FA**********************************@microso ft.com...
vb.net 2003 & SQL2005

when opening a form i greate a dataset and add a table to it, what im
trying to find out is the best way to destroy the dataset when i close
the
form

any ideas?



Aug 9 '06 #4
Cor,

That is exactly the case, the form being closed is not the main form.

If the operator reopens the sub form the i get an error as it tries to
create the dataset again. the only way i can see is to create a 'global'
dataset on the main form adn add and dropp tables each time any sub form is
opened or closed ? is this the way to go ??

"Cor Ligthert [MVP]" wrote:
Peter,

Why will you destroy it, as it will be destroyed?

If closing the form is not closing the main form, than it is another
situation.
Is it that?

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in bericht
news:5D**********************************@microsof t.com...
Cor, i was hoping to be able to destroy it after i close the form. The
dataset is recreated with freash data if the operator goed in to that
sectoion of the application again

i have tried ther .dispose option when closing the form but tht hasnt
worked

"Cor Ligthert [MVP]" wrote:
Peter,

There are in the system.data (adonet) no unmanaged resources. Therefore
it
will be destroyed by the GC after that you have closes your program. Or
do
you mean something else with your question?

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in bericht
news:FA**********************************@microsof t.com...
vb.net 2003 & SQL2005

when opening a form i greate a dataset and add a table to it, what im
trying to find out is the best way to destroy the dataset when i close
the
form

any ideas?


Aug 15 '06 #5
Peter,

Normally is the best way to add a component to your project using the Add
Items in Solution Explorer and use that class for your datahandling.
(The DataAccesLayer).

If you want, than declaring a dataset shared in that class is than probably
the simplest way to do the first time that you are dealing with this.

I hope this gives an idea

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in bericht
news:EE**********************************@microsof t.com...
Cor,

That is exactly the case, the form being closed is not the main form.

If the operator reopens the sub form the i get an error as it tries to
create the dataset again. the only way i can see is to create a 'global'
dataset on the main form adn add and dropp tables each time any sub form
is
opened or closed ? is this the way to go ??

"Cor Ligthert [MVP]" wrote:
>Peter,

Why will you destroy it, as it will be destroyed?

If closing the form is not closing the main form, than it is another
situation.
Is it that?

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in bericht
news:5D**********************************@microso ft.com...
Cor, i was hoping to be able to destroy it after i close the form. The
dataset is recreated with freash data if the operator goed in to that
sectoion of the application again

i have tried ther .dispose option when closing the form but tht hasnt
worked

"Cor Ligthert [MVP]" wrote:

Peter,

There are in the system.data (adonet) no unmanaged resources.
Therefore
it
will be destroyed by the GC after that you have closes your program.
Or
do
you mean something else with your question?

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in
bericht
news:FA**********************************@microso ft.com...
vb.net 2003 & SQL2005

when opening a form i greate a dataset and add a table to it, what
im
trying to find out is the best way to destroy the dataset when i
close
the
form

any ideas?



Aug 15 '06 #6

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

Similar topics

3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
3
by: Jeronimo Bertran | last post by:
Hi, I have an xml file that encapsulates a dataset definition within a set of tags (<dataset>)... here is an example <?xml version="1.0" encoding="utf-16"?> <dataset> <MyTable>...
5
by: Mike | last post by:
I need to expand the DataSet class by inheriting from it and adding functions that work on the data in the tables. However, since I can't upcast how can I get my base DataSet object assigned an...
3
by: JJ | last post by:
Hi, I need to pass a dataset to another win form along with a SqldataAdapter. I don't want to recreate the SqlDataAdapter again either. So to pass to another Win form in my windows form app, do...
5
by: Jason | last post by:
I am having problems understanding how to access a datasource only once, fill a single dataset, and then reference that dataset multiple times through different user controls(ascx) found on the...
2
by: John Holmes | last post by:
I have a web interface where the user types in ID's one at a time. After an ID is typed in, a button is clicked and the button click event has code that does a query and returns a data reader and...
15
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
16
by: Geoff Jones | last post by:
Hi Can anybody help me with the following, hopefully simple, question? I have a table which I've connected to a dataset. I wish to add a new column to the beginning of the table and to fill...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
1
by: matt | last post by:
hello, i have a web app that allows users to query our oracle db and produce a dataset of report data. they then have the option to serialize this data and store it in the database. later, then...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.