473,405 Members | 2,294 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.

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 2753
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fernando Rodriguez | last post by:
Hi, I need to traverse the methods defined in a class and its superclasses. This is the code I'm using: # An instance of class B should be able to check all the methods defined in B #and A,...
1
by: Oplec | last post by:
Hi, I'm learning C++ as a hobby using The C++ Programming Language : Special Edition by Bjarne Stroustrup. I'm working on chpater 13 exercises that deal with templates. Exercise 13.9 asks for me...
9
by: Banaticus Bart | last post by:
I wrote an abstract base class from which I've derived a few other classes. I'd like to create a base class array where each element is an instance of a derived object. I can create a base class...
1
by: Craig Buchanan | last post by:
Has any one been able to get MS DataAccess Block code to populate a return parameter in the ExecuteReader method? If so, how? Thanks, Craig Buchanan
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
2
by: Snake Pliskin | last post by:
how do I construct a dataaccess layer in VB.NET !!??! Is there a common template that I can use !??!
4
by: dm1608 | last post by:
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...
0
by: sam | last post by:
Hi: I am not sure if this is the right place to post this question. Please let me know if it is not and I appreciate if someone could point me in the right direction. I am getting this error...
1
by: va | last post by:
I'd appreciate any feedback Where some of the Enterprise Application Blocks are pretty powerful, with all the cool binding controls and the simplicity of combined objectsource and sqlsource ,...
4
by: Peter Kanurer | last post by:
Assume I add in VisualCSharp 2005 References to Oracle.DataAccess AND System.Data.OracleClient to an application. Does this cause problems or can they co-exist in one application ?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
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...
0
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...
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.