473,663 Members | 2,694 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Showing Progress while filling a dataset

I have a large amount of data I'm dropping into a dataset and would
like to find a way to at the very least show the user that the program
is working at retrieving the data and not locked up.

I have been unable to find a way to do this with a progress bar so I
thought that I would try to disply a message with an animated gif, but
I cannot get the gif to animate while the dataset is being filled
which is not doing me any good.

Any ideas? Please help.

Scott
Nov 16 '05 #1
4 11783
In article <8e************ **************@ posting.google. com>,
sc***@definingl ogic.com says...
I have a large amount of data I'm dropping into a dataset and would
like to find a way to at the very least show the user that the program
is working at retrieving the data and not locked up.

I have been unable to find a way to do this with a progress bar so I
thought that I would try to disply a message with an animated gif, but
I cannot get the gif to animate while the dataset is being filled
which is not doing me any good.

Any ideas? Please help.

Scott

The way I would do it is set of a separate thread, and have a callback
that runs at the completion of the dataset fill. The call back would
then cause the progress ui to stop.
--
Thanks
Mark
Nov 16 '05 #2
guy
Hi!
the best way is create progress bar like i'm doing every time:
i create new form with that contain only progress bar control and show it
like that:
frmProcess p = new frmProcess();
Cursor.Current = Cursors.WaitCur sor;
p.progressBar.M aximum = gridEX1.RowCoun t;
p.progressBar.V alue = 0;
p.Show();
for(int i=0;i<gridEX1.R owCount;i++)
{
...
p.progressBar.V alue = i;
Application.DoE vents();
}
"Mark Marsella" wrote:
In article <8e************ **************@ posting.google. com>,
sc***@definingl ogic.com says...
I have a large amount of data I'm dropping into a dataset and would
like to find a way to at the very least show the user that the program
is working at retrieving the data and not locked up.

I have been unable to find a way to do this with a progress bar so I
thought that I would try to disply a message with an animated gif, but
I cannot get the gif to animate while the dataset is being filled
which is not doing me any good.

Any ideas? Please help.

Scott

The way I would do it is set of a separate thread, and have a callback
that runs at the completion of the dataset fill. The call back would
then cause the progress ui to stop.
--
Thanks
Mark

Nov 16 '05 #3
OK, I have tried to start a new form using a new thread that will show
the user a message and run an animated gif while the dataset fills up,
but I keep getting 'Out of memory errors'. I sure the mistake I'm
making is simple, but can someone run down the correct way to display
a new form using a new thread?

-Scott

guy <gu*@discussion s.microsoft.com > wrote in message news:<10******* *************** ************@mi crosoft.com>...
Hi!
the best way is create progress bar like i'm doing every time:
i create new form with that contain only progress bar control and show it
like that:
frmProcess p = new frmProcess();
Cursor.Current = Cursors.WaitCur sor;
p.progressBar.M aximum = gridEX1.RowCoun t;
p.progressBar.V alue = 0;
p.Show();
for(int i=0;i<gridEX1.R owCount;i++)
{
...
p.progressBar.V alue = i;
Application.DoE vents();
}
"Mark Marsella" wrote:
In article <8e************ **************@ posting.google. com>,
sc***@definingl ogic.com says...
I have a large amount of data I'm dropping into a dataset and would
like to find a way to at the very least show the user that the program
is working at retrieving the data and not locked up.

I have been unable to find a way to do this with a progress bar so I
thought that I would try to disply a message with an animated gif, but
I cannot get the gif to animate while the dataset is being filled
which is not doing me any good.

Any ideas? Please help.

Scott

The way I would do it is set of a separate thread, and have a callback
that runs at the completion of the dataset fill. The call back would
then cause the progress ui to stop.
--
Thanks
Mark

Nov 16 '05 #4
Hi,

This was duscussed last week, below is the code I posted.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


public delegate void ProcessedFileHa ndler( );
Thread workingThread;

private System.Windows. Forms.ProgressB ar progressBar1;

void Done()
{
MessageBox.Show ("Done");
this.Close();
}

void ImportImage( )
{

// Load datagrid

//inform the UI that I'm done
this.progressBa r1.Invoke( new ProcessedFileHa ndler( this.Done), null);
}

private void ImportImages_Lo ad(object sender, System.EventArg s e)
{
this.workingThr ead = new Thread(new ThreadStart(thi s.ImportImage)) ;
this.workingThr ead.Start();
}


"Scott Lundstrom" <sc***@defining logic.com> wrote in message
news:8e******** *************** ***@posting.goo gle.com...
I have a large amount of data I'm dropping into a dataset and would
like to find a way to at the very least show the user that the program
is working at retrieving the data and not locked up.

I have been unable to find a way to do this with a progress bar so I
thought that I would try to disply a message with an animated gif, but
I cannot get the gif to animate while the dataset is being filled
which is not doing me any good.

Any ideas? Please help.

Scott

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2063
by: ssp | last post by:
Dear all, I'm dealing with a very tricky problem and can't seem to find the answer with google. the problem is: i want to store huge data (binaries) inside a mysql databases blob - to later store those data to a file somewhere else (from where i can connect the database). problem comes into play, when I try to output a "progress" of the reading of this data (kind of "xx bytes of XXX bytes already transmitted").
1
2203
by: Krzysztof Karnicki | last post by:
I have such a problem… I have create my custom DataGridColumn inheriting from System.Windows.Forms.DataGridColumnStyle on using it on DataGrid, to show rows painted by me self. Because dates taken from database are very large, and filling DataSet bounded to this DataGrid takes some time, a decided to put fill logic into new thread. And so method running in this thread clears only this DataSet bounded to DataGrid and fills it once more...
4
6212
by: Fabian | last post by:
Hello, i need an example to fill a Dataset Object without a Database. I want to save Strings, like a Database for using it in a Crystal Report. Does anyone have an example for me please ? Thx and regards Fabian
5
1724
by: Jean Christophe Avard | last post by:
Hi! I have a query that INNER JOIN's three other tables. All the relation are 1 to 1, except for one, where an Item can have more than one price. I have this query that work fine in MSDE Query Analyzer, but when I fill a dataset with it, I get an error. (I attached a screenshot of it) visual basic code:------------------------------------------------------------------------------
2
1356
by: savvy | last post by:
I'm trying to page a datagrid but the when i'm tying to fill the DataSet with a table, I know that using DataAdapter.Fill you can specify a single datatable to populate when the sp returns one table. How do I fill my dataset when the sp is a combination of two tables. i'm not able to understand how to fill it when i'm using a sql server stored procedure as given below any suggestions will be greatly appreciated. Thanks for your help and...
2
7871
by: Peter S. | last post by:
I am pulling some data from a source via ODBC and placing the information in a DataSet. The first pull is very large but once that is complete I plan to do nightly pulls to get any new data that gets put in the (remote) table. I can't seem to get past that initial (big) pull of data, as I get OutOfMemory exceptions. I took a look back at when this occurs and it seems to happen upon stuffing the DataSet with either the 2097153 record or...
6
1793
by: Vikas Kumar | last post by:
Hi if I want to show a progress bar in my web application how can i do it Like this much % of task has been completed as its shown when installing some desktop application i want to do same in my web application
1
5123
by: mike11d11 | last post by:
I'm doing a simple TableAdapter.Fill filling my datatable from a view within a SQL database. for some reason it is timing out after 30 seconds and I cant seem to find out where in vb.net 2005 I can go to change the timeout setting for this. when i go to my project, then my settings tab i set the connection timeout for 120, but it doesn't seem to affect the timeout for filling my datatable. Code used to fill datatable:...
8
13810
by: Manesh Pawar | last post by:
Heloo, I m working on ASP.net2.0 I m facing an error like "Object reference Not set to an instance" while filling dataset wht will b the Solution for this error?
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8858
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8771
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8634
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5657
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2763
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
2
2000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.