473,382 Members | 1,386 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,382 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 1167
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
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
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.