473,587 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1174
Hi,

Maybe this will help.

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

Ken
-------------------
"dm1608" <dm****@spam.ne t> wrote in message
news:Og******** *****@TK2MSFTNG P10.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.ne t> wrote in message
news:Og******** *****@TK2MSFTNG P10.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*******@hotm ail.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
The DataGridView appears to have a RowsAdded event you could probably use
to update the progress bar.

"dm1608" <dm****@spam.ne t> wrote in message
news:Og******** *****@TK2MSFTNG P10.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
9589
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, while an instance of class C should be able to check all methods #defined in C, B and A. #------------------------------------------------
1
3332
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 to turn a previously made String class that deals with char's into a templated String class that uses the template parameter C instead of char. I...
9
4984
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 pointer which points to an instance of a derived class, but when I pass that base class pointer into a function, it can't access the derived...
1
1232
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
2
910
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
2761
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 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...
0
1570
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 after converting to .NET 2.0. Unable to cast object of type 'Oracle.DataAccess.Client.OracleCommand' to type 'System.Data.Common.DbCommand'
1
976
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 , does the DataAccess Enterprise Application Blocks 2.0 still have the same benefits?
4
5014
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
7918
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.