473,394 Members | 1,722 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,394 software developers and data experts.

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 11755
In article <8e**************************@posting.google.com >,
sc***@defininglogic.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.WaitCursor;
p.progressBar.Maximum = gridEX1.RowCount;
p.progressBar.Value = 0;
p.Show();
for(int i=0;i<gridEX1.RowCount;i++)
{
...
p.progressBar.Value = i;
Application.DoEvents();
}
"Mark Marsella" wrote:
In article <8e**************************@posting.google.com >,
sc***@defininglogic.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*@discussions.microsoft.com> wrote in message news:<10**********************************@microso ft.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.WaitCursor;
p.progressBar.Maximum = gridEX1.RowCount;
p.progressBar.Value = 0;
p.Show();
for(int i=0;i<gridEX1.RowCount;i++)
{
...
p.progressBar.Value = i;
Application.DoEvents();
}
"Mark Marsella" wrote:
In article <8e**************************@posting.google.com >,
sc***@defininglogic.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 ProcessedFileHandler( );
Thread workingThread;

private System.Windows.Forms.ProgressBar progressBar1;

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

void ImportImage( )
{

// Load datagrid

//inform the UI that I'm done
this.progressBar1.Invoke( new ProcessedFileHandler( this.Done), null);
}

private void ImportImages_Load(object sender, System.EventArgs e)
{
this.workingThread = new Thread(new ThreadStart(this.ImportImage));
this.workingThread.Start();
}


"Scott Lundstrom" <sc***@defininglogic.com> wrote in message
news:8e**************************@posting.google.c om...
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
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...
1
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 ...
4
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 ? ...
5
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...
2
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...
2
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...
6
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...
1
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...
8
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
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...
0
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,...
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...

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.