471,310 Members | 961 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

DataAccess Class

Hi, I'm developing a simple DataAccess class using VB.NET and C# 2005 and
currently query a SQL Database with the class which returns an ArrayList
object. Only about 50 rows or so. This works fine.

From my main form, I simply loop thru the arraylist and populate a
datagridview control and update a progress bar.

The issue I have is that this seems a bit cheesy. I mean, it only takes a
sec. to update the datagridview and the progressbar flies.

How can I load the data from the DataAccess layer and update my progress bar
from the main form? Do I use events? Can someone explain to me the best
way to handle this?

Most of my processing is done in the DataAccess layer.

Thanks.
Dec 13 '05 #1
4 1118
Hi,

Maybe this will help.

http://www.vb-tips.com/default.aspx?...6-fc0d5c470f53

Ken
-------------------
"dm1608" <dm****@spam.net> wrote in message
news:Og*************@TK2MSFTNGP10.phx.gbl...
Hi, I'm developing a simple DataAccess class using VB.NET and C# 2005 and
currently query a SQL Database with the class which returns an ArrayList
object. Only about 50 rows or so. This works fine.

From my main form, I simply loop thru the arraylist and populate a
datagridview control and update a progress bar.

The issue I have is that this seems a bit cheesy. I mean, it only takes
a sec. to update the datagridview and the progressbar flies.

How can I load the data from the DataAccess layer and update my progress
bar from the main form? Do I use events? Can someone explain to me the
best way to handle this?

Most of my processing is done in the DataAccess layer.

Thanks.

Dec 13 '05 #2
If I were you I would use a generic list instead of your ArrayList.
You don't have to; but it good to leverage all the features you can
from the .NET Framework.

Dec 14 '05 #3
The DataGridView appears to have a RowsAdded event you could probably use to
update the progress bar.

"dm1608" <dm****@spam.net> wrote in message
news:Og*************@TK2MSFTNGP10.phx.gbl...
Hi, I'm developing a simple DataAccess class using VB.NET and C# 2005 and
currently query a SQL Database with the class which returns an ArrayList
object. Only about 50 rows or so. This works fine.

From my main form, I simply loop thru the arraylist and populate a
datagridview control and update a progress bar.

The issue I have is that this seems a bit cheesy. I mean, it only takes
a sec. to update the datagridview and the progressbar flies.

How can I load the data from the DataAccess layer and update my progress
bar from the main form? Do I use events? Can someone explain to me the
best way to handle this?

Most of my processing is done in the DataAccess layer.

Thanks.

Dec 14 '05 #4
Thanks -- this is good to know. However, I think I would have to load the
data for the DGV within my DataAccess, which kind of violates my rule of not
accessing user-interface stuff from DA??

"Eric" <t1*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
The DataGridView appears to have a RowsAdded event you could probably use
to update the progress bar.

"dm1608" <dm****@spam.net> wrote in message
news:Og*************@TK2MSFTNGP10.phx.gbl...
Hi, I'm developing a simple DataAccess class using VB.NET and C# 2005 and
currently query a SQL Database with the class which returns an ArrayList
object. Only about 50 rows or so. This works fine.

From my main form, I simply loop thru the arraylist and populate a
datagridview control and update a progress bar.

The issue I have is that this seems a bit cheesy. I mean, it only takes
a sec. to update the datagridview and the progressbar flies.

How can I load the data from the DataAccess layer and update my progress
bar from the main form? Do I use events? Can someone explain to me the
best way to handle this?

Most of my processing is done in the DataAccess layer.

Thanks.


Dec 14 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Fernando Rodriguez | last post: by
1 post views Thread by Craig Buchanan | last post: by
2 posts views Thread by Snake Pliskin | last post: by
4 posts views Thread by dm1608 | last post: by
reply views Thread by rosydwin | last post: by

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.