I had a random thought today. Is it possible to make a complete application
with several forms that contain databound info such as textboxes or
dataGridViews and use 1 and only 1 dataset for the entire application?

I ask because, when I created my program, for each and every form that has
databound information, there is a dataset that is created.

Now, correct me if I'm wrong, but when a tableAdapter, or DataTable is
associated with the dataset, doesn't that contact the dataSource (ie. DB on
server or remote location) during a fill(dtTableName) using excessive
bandwidth? I ask about the bandwidth issue because I have an application
that fills from the Products table of the database which contains over 6000+
records. I have 3 different forms that need to fill a tableAdapter from the
Products table of the DB. Couldn't I just use the ONE dataset that might be
Public to the entire app and grab the info from there. I understand that
when changes are made and saved, then they will be saved to the dataSource
which uses bandwidth but having to fill the info everytime I need to use a
table from the DB takes a while to load the records.

I hope to be schooled here since I mostly know about the drag and drop
methods shown from online tutorials from Microsoft's Webcasts page.

Unfortunately, I am using an Access DB on a mapped network drive but there
has to be an easier/faster way of retrieving the data I need, right?

Tony K.

Re: Stupid Question..Maybe by Stephany

Stephany
Tue May 06 17:07:24 CDT 2008

Yes.


"Tony K" <myfirstname@kingprogramming.com> wrote in message
news:%23VSncF6rIHA.3716@TK2MSFTNGP04.phx.gbl...
>I had a random thought today. Is it possible to make a complete
>application with several forms that contain databound info such as
>textboxes or dataGridViews and use 1 and only 1 dataset for the entire
>application?
>
> I ask because, when I created my program, for each and every form that has
> databound information, there is a dataset that is created.
>
> Now, correct me if I'm wrong, but when a tableAdapter, or DataTable is
> associated with the dataset, doesn't that contact the dataSource (ie. DB
> on server or remote location) during a fill(dtTableName) using excessive
> bandwidth? I ask about the bandwidth issue because I have an application
> that fills from the Products table of the database which contains over
> 6000+ records. I have 3 different forms that need to fill a tableAdapter
> from the Products table of the DB. Couldn't I just use the ONE dataset
> that might be Public to the entire app and grab the info from there. I
> understand that when changes are made and saved, then they will be saved
> to the dataSource which uses bandwidth but having to fill the info
> everytime I need to use a table from the DB takes a while to load the
> records.
>
> I hope to be schooled here since I mostly know about the drag and drop
> methods shown from online tutorials from Microsoft's Webcasts page.
>
> Unfortunately, I am using an Access DB on a mapped network drive but there
> has to be an easier/faster way of retrieving the data I need, right?
>
> Tony K.
>
>
>


Re: Stupid Question..Maybe by Cor

Cor
Wed May 07 07:20:02 CDT 2008

Tony,

Is has not to be Global, all in OOP goes about references.

Let say you create a class like this

Public Class Whatever
private myDataSet as DataSet 'This is nothing more then a placeholder for
the reference
Public sub New(byval ds as DataSet)
myDataSet = ds
End Sub
End Class

And you call that sub by
dim myWhatEver as Whatever(TheDataSetIHaveFilled)

Then you can use that dataset in that class.

Cor


"Tony K" <myfirstname@kingprogramming.com> schreef in bericht
news:%23VSncF6rIHA.3716@TK2MSFTNGP04.phx.gbl...
>I had a random thought today. Is it possible to make a complete
>application with several forms that contain databound info such as
>textboxes or dataGridViews and use 1 and only 1 dataset for the entire
>application?
>
> I ask because, when I created my program, for each and every form that has
> databound information, there is a dataset that is created.
>
> Now, correct me if I'm wrong, but when a tableAdapter, or DataTable is
> associated with the dataset, doesn't that contact the dataSource (ie. DB
> on server or remote location) during a fill(dtTableName) using excessive
> bandwidth? I ask about the bandwidth issue because I have an application
> that fills from the Products table of the database which contains over
> 6000+ records. I have 3 different forms that need to fill a tableAdapter
> from the Products table of the DB. Couldn't I just use the ONE dataset
> that might be Public to the entire app and grab the info from there. I
> understand that when changes are made and saved, then they will be saved
> to the dataSource which uses bandwidth but having to fill the info
> everytime I need to use a table from the DB takes a while to load the
> records.
>
> I hope to be schooled here since I mostly know about the drag and drop
> methods shown from online tutorials from Microsoft's Webcasts page.
>
> Unfortunately, I am using an Access DB on a mapped network drive but there
> has to be an easier/faster way of retrieving the data I need, right?
>
> Tony K.
>
>
>


Re: Stupid Question..Maybe by Tony

Tony
Wed May 07 11:55:21 CDT 2008

Thanks Cor. That makes sense.
Tony

"Cor Ligthert[MVP]" <notmyfirstname@planet.nl> wrote in message
news:A00122F2-E12B-4CDF-BF7E-ADD5862DD4E4@microsoft.com...
> Tony,
>
> Is has not to be Global, all in OOP goes about references.
>
> Let say you create a class like this
>
> Public Class Whatever
> private myDataSet as DataSet 'This is nothing more then a placeholder for
> the reference
> Public sub New(byval ds as DataSet)
> myDataSet = ds
> End Sub
> End Class
>
> And you call that sub by
> dim myWhatEver as Whatever(TheDataSetIHaveFilled)
>
> Then you can use that dataset in that class.
>
> Cor
>
>
> "Tony K" <myfirstname@kingprogramming.com> schreef in bericht
> news:%23VSncF6rIHA.3716@TK2MSFTNGP04.phx.gbl...
>>I had a random thought today. Is it possible to make a complete
>>application with several forms that contain databound info such as
>>textboxes or dataGridViews and use 1 and only 1 dataset for the entire
>>application?
>>
>> I ask because, when I created my program, for each and every form that
>> has databound information, there is a dataset that is created.
>>
>> Now, correct me if I'm wrong, but when a tableAdapter, or DataTable is
>> associated with the dataset, doesn't that contact the dataSource (ie. DB
>> on server or remote location) during a fill(dtTableName) using excessive
>> bandwidth? I ask about the bandwidth issue because I have an application
>> that fills from the Products table of the database which contains over
>> 6000+ records. I have 3 different forms that need to fill a tableAdapter
>> from the Products table of the DB. Couldn't I just use the ONE dataset
>> that might be Public to the entire app and grab the info from there. I
>> understand that when changes are made and saved, then they will be saved
>> to the dataSource which uses bandwidth but having to fill the info
>> everytime I need to use a table from the DB takes a while to load the
>> records.
>>
>> I hope to be schooled here since I mostly know about the drag and drop
>> methods shown from online tutorials from Microsoft's Webcasts page.
>>
>> Unfortunately, I am using an Access DB on a mapped network drive but
>> there has to be an easier/faster way of retrieving the data I need,
>> right?
>>
>> Tony K.
>>
>>
>>
>