473,466 Members | 1,354 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Showing a processing icon while data is being transferred

36 New Member
The data is transferred from one table to another when user clicks on a button on the screen. The transfer takes approax 10-15 seconds. During this time I am able to move the mouse but not able to click on any buutons on the screen. It gives me a feeling as if system is hanged.

Is it possible to show some processing icon during this 10-15 seconds when data is being transferred so that user does not doubt whether data transfer is taking place or system is hanged?
Sep 13 '07 #1
14 4525
hariharanmca
1,977 Top Contributor
The data is transferred from one table to another when user clicks on a button on the screen. The transfer takes approax 10-15 seconds. During this time I am able to move the mouse but not able to click on any buutons on the screen. It gives me a feeling as if system is hanged.

Is it possible to show some processing icon during this 10-15 seconds when data is being transferred so that user does not doubt whether data transfer is taking place or system is hanged?
I think the below link will help you.
Load Gif
Sep 13 '07 #2
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Why not change the Mouse Icon, before starting the transfer:

Expand|Select|Wrap|Line Numbers
  1. Me.MousePointer = vbHourGlass
  2.  
later, after completion :

Expand|Select|Wrap|Line Numbers
  1. Me.MousePointer = vbNormal
  2.  
U can also Load Animated mouse pointer and set it

Regards
Veena
Sep 13 '07 #3
hariharanmca
1,977 Top Contributor
  • We have to show progress bar if we know the limit of process or we have to show some .gif file for the indication of process.
  • We have to make the mouse pointer to hourglass is default for all process.
Sep 13 '07 #4
Killer42
8,435 Recognized Expert Expert
Me.MousePointer = vbNormal
:) Technically, it should be vbDefault. Doesn't really matter much of course, since they have the same value.

Abhishek Bhatt, perhaps you could give us some idea of the actual "data transfer" process that is happening during that 0-15 seconds? For instance, is this a database command of some sort? Is it one big "call" that takes that long to return control to your code, or is your program spending 10-15 seconds going around a loop of some sort? What version of VB are you using? For that matter, what version of windows? (Although the Windows version probably won't make any difference, unless you're stuck in the dark ages with Windows 3.1 or something.)

By the way, it might be worth looking into the Animation control.
Sep 13 '07 #5
Abhishek Bhatt
36 New Member
:) Technically, it should be vbDefault. Doesn't really matter much of course, since they have the same value.

Abhishek Bhatt, perhaps you could give us some idea of the actual "data transfer" process that is happening during that 0-15 seconds? For instance, is this a database command of some sort? Is it one big "call" that takes that long to return control to your code, or is your program spending 10-15 seconds going around a loop of some sort? What version of VB are you using? For that matter, what version of windows? (Although the Windows version probably won't make any difference, unless you're stuck in the dark ages with Windows 3.1 or something.)

By the way, it might be worth looking into the Animation control.

My program is fetching all records from one table and inserting it onto another table.
VB version is 6.3
Sep 13 '07 #6
Killer42
8,435 Recognized Expert Expert
My program is fetching all records from one table and inserting it onto another table.
VB version is 6.3
Ok, but the question is how?

Does your program just issue one big INSERT (or whatever) statement to the database, then get control back when it's all done? Or does your program loop around and do a database command to copy each record? This will make a difference to what you can do during the process.

Um... 6.3 - does that mean it's VBA, which is built into MS Access? Or is it standalone Visual Basic? I thought the last version of "real" Visual Basic was 6.0.
Sep 14 '07 #7
improvcornartist
303 Recognized Expert Contributor
You could put a spinner gif, or something similar, in a div that starts out hidden. Just before you start the process, such as on button click, you can change the div to visible. When the process ends, switch the div back to hidden. Maybe not the best solution, but it works.
Sep 14 '07 #8
Killer42
8,435 Recognized Expert Expert
You could put a spinner gif, or something similar, in a div that starts out ...
A "div"? We are talking about VB6 here, right?
Sep 14 '07 #9
Robbie
180 New Member
A "div"? We are talking about VB6 here, right?
He could be referring to the link Hari gave in his/her first post.
Even if that's so though, it would be easier and probably look nicer just to hide the entire WebBrowser control.
Sep 14 '07 #10
Abhishek Bhatt
36 New Member
Ok, but the question is how?

Does your program just issue one big INSERT (or whatever) statement to the database, then get control back when it's all done? Or does your program loop around and do a database command to copy each record? This will make a difference to what you can do during the process.

Um... 6.3 - does that mean it's VBA, which is built into MS Access? Or is it standalone Visual Basic? I thought the last version of "real" Visual Basic was 6.0.
Ok. My program reads the data from a table of another database and insert all the records one by one in a table of my database.

Yes it's a VBA.

I have written my code in a module. On click of a menu item in the application the code of the module gets executed.
Sep 14 '07 #11
Abhishek Bhatt
36 New Member
Hi,

Why not change the Mouse Icon, before starting the transfer:

Expand|Select|Wrap|Line Numbers
  1. Me.MousePointer = vbHourGlass
  2.  
later, after completion :

Expand|Select|Wrap|Line Numbers
  1. Me.MousePointer = vbNormal
  2.  
U can also Load Animated mouse pointer and set it

Regards
Veena
Thanks Veena...The solution worked.
I had to put
Screen.MousePointer = 11
at the start of the code

and
Screen.MousePointer = 0
at the end of the code
Sep 14 '07 #12
pureenhanoi
175 New Member
Ok. My program reads the data from a table of another database and insert all the records one by one in a table of my database.

Yes it's a VBA.

I have written my code in a module. On click of a menu item in the application the code of the module gets executed.
I have no idea about making animation during the transfer. But there is another way to prevent hanging system from Loop
Its terrible if you select more than several hundreds of rows into recordset and use loop to insert one by one into another table. It take alot of time and hanging the system until transfering completed.
The context here is: you have two database db1.mdb and db2.mdb (db1 is working database, and db2 is external database)
Expand|Select|Wrap|Line Numbers
  1. Dim cnxn As New ADODB.Connection
  2. Dim sql As String
  3.  
  4. 'working with current database
  5. cnxn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\db1.mdb"
  6. cnxn.Open
  7.  
  8. sql = "INSERT INTO tablename1(colunm1,column2...) (SELECT column1,column2... FROM tablename2 IN 'c:\db2.mdb' WHERE condition=True)"
  9. cnxn.Excute sql
  10.  
by selecting and inserting multi-record, u can prevent from loop and save lot of time
Sep 14 '07 #13
Abhishek Bhatt
36 New Member
But my one database is SQL server and another Sybase.
Can I do something to transfer data in bulk instead of fetching it into recordset and then inserting each record one by one?
Sep 17 '07 #14
Killer42
8,435 Recognized Expert Expert
But my one database is SQL server and another Sybase.
Can I do something to transfer data in bulk instead of fetching it into recordset and then inserting each record one by one?
Perhaps you could invoke an Export function in one, and an Import in the other, and let them do the work for you.
Sep 17 '07 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Papa.Legba.666 | last post by:
I decided to validate each page of my site. Did the front page, decdided to add the w3c validated logo and it shows up in FireFox, but not in MSIE. In FireFox, the page source shows <a...
1
by: Gordon Sanderson | last post by:
I have been working with for two days on a database with no problems(changing forms and adding code to the forms and a module). Shut down last night was fine, with no errors generated. This...
6
by: perspolis | last post by:
Hi I have a question about using exceptions or showing error messages .I say this by an example first way: if(n<0 and w<0) MessageBox.Show("please enter positive") else if (n=0 or w>0)...
6
by: Amongin Ewinyu | last post by:
Hi, I have an application that is controlled by a service. when the service starts, an icon is supposed to be placed in the system tray and this icon is then used to display a balloon...
4
by: Gary | last post by:
Hi, I get this error " " when my web page run, what does it mean? Hope someone can help!!! Gary
10
by: shankwheat | last post by:
I'm experimenting with using a AJAX style "processing" icon. The process I'm running in the background with xmlHttp is intensive and takes a 5--10 secs to complete. Instead of my processing icon...
1
by: shara | last post by:
Hello there, Right now, iam having a php script that uploads data to a server and finally gives a message to the user that "upload is successful".But i want to change it in such a way that the...
1
by: Miro | last post by:
VB 2005 Express. I can create a simple MDI app, with 2 forms. On Form1 I add a menustrip on top - and click on ( Insert Standard Items ) Add a ToolStrip as well and add 2 buttons. On Form2,...
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
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...
1
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
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...
0
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...
0
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...
0
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 ...

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.