I'm connecting to an Oracle database and running a query which returns
data. The query can be fairly long - 2-3 minutes. I have a label set
up on the form which is invisible to begin with. I want to make it
visible (with it's message) when the user clicks a button to run the
query. The label informs the user that the system is getting the data.
My code to do this is:
Private Sub btnRun_Click(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles btnRun.Click
labWork.Visible = True
This works perfectly if no other code comes after. However, if my code
to connect to the database and run the query comes after it, then the
label does not show up until the connection to the database completes
and the data is returned.
Is there a way to force this label to be visible BEFORE the connection
to the database is made? Any ideas?
I would eventually like to use a progress bar in this case, but it was
having the same problem. I simplified it to just use a label assuming
that would be easier.
Thanks in advance. 3 1749
Joe,
You might try labWork.Refresh () immediately after making the label visible.
Kerry Moorman
"Joe" wrote:
I'm connecting to an Oracle database and running a query which returns
data. The query can be fairly long - 2-3 minutes. I have a label set
up on the form which is invisible to begin with. I want to make it
visible (with it's message) when the user clicks a button to run the
query. The label informs the user that the system is getting the data.
My code to do this is:
Private Sub btnRun_Click(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles btnRun.Click
labWork.Visible = True
This works perfectly if no other code comes after. However, if my code
to connect to the database and run the query comes after it, then the
label does not show up until the connection to the database completes
and the data is returned.
Is there a way to force this label to be visible BEFORE the connection
to the database is made? Any ideas?
I would eventually like to use a progress bar in this case, but it was
having the same problem. I simplified it to just use a label assuming
that would be easier.
Thanks in advance.
Kerry,
That did it. Thanks!
-Joe
Hello joe,
The reason your label doesn't show is because database operations (for the
most part) are blocking operations. This means that the thread they execute
in stop pumping messages while the database work is being performed. Since
you are doing this work on the UI thread, your UI becomes unresponsive.
You can instead do the work on a separate thread.. or you may wish to massage
the message pump manually from time to time.
-Boo
I'm connecting to an Oracle database and running a query which returns
data. The query can be fairly long - 2-3 minutes. I have a label set
up on the form which is invisible to begin with. I want to make it
visible (with it's message) when the user clicks a button to run the
query. The label informs the user that the system is getting the
data.
My code to do this is:
Private Sub btnRun_Click(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles btnRun.Click
labWork.Visible = True
This works perfectly if no other code comes after. However, if my
code to connect to the database and run the query comes after it, then
the label does not show up until the connection to the database
completes and the data is returned.
Is there a way to force this label to be visible BEFORE the connection
to the database is made? Any ideas?
I would eventually like to use a progress bar in this case, but it was
having the same problem. I simplified it to just use a label assuming
that would be easier.
Thanks in advance. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Yoshitha |
last post by:
Hello,
I have a doubt...
I have a TextBox by name txtMessage.Text ,Button by name btnSend and
Datalist Control by name dltMessage i my aspx page.
when i enter the data in text box and click on the button it is storing
the data into the database.
The saved information has to displayed in the datalist....
|
by: mfeingold |
last post by:
I am working on a system, which among other things includes a server and a
..net control sitting in an html page and connected to the server. I ran into
a couple of problems, you guys might have some insight about.
1) It takes 20 sec or so to open a tcp socket from the client to the server.
It just sits in the TcpClient.conect waiting for something. When I run the
same control from a windows application it connects right away and works...
|
by: Geraldine Hobley |
last post by:
Hello
I have a problem whereby I have a treeview control on one form called projecttree and I wish to clea
the nodes from this control in another form
The form that contains the treeview is called projecttree and the form that I wish to clear the node
from the tree, (because I'm connecting to a different database) is called frmConnections
The forms are on the screen at the same time, and they are of type crownwood docking control
...
|
by: jcrouse |
last post by:
Is there a quick and easy way to change the color of a label controls border
from the default black to white?
Thank you,
John
|
by: Frustrated Developer via DotNetMonster.com |
last post by:
I have developed a form that would allow the user to load and search a
database several ways, by data range using two combo boxes, by specific
number entered in a text box or all database entries. I'm able to use the
combo box selection method multiple times with no problem However, when I try
to type in a specific drawing number in the txtDrawingNum.text field and
click btnLoad I get the
same dataset that I previously had from the combo...
| |
by: Mike |
last post by:
Hi,
I am strugling with a simple problem which I can't seem to resolve.
I have an asp.net page which contains a server-control (flytreeview,
which is a kind
of a tree to be exact).
The tree is being updated by some other process through remoting.
When the page loads, I init the tree, and in my browser I can see the
initialized tree.
The problem is that every time that I receive update to tree from the
remote process,
|
by: Hansen |
last post by:
Hi
I have a form with multiple labels and textboxes and listboxes that
need to be made visible and not visible when buttons are clicked. Is
there anyway of grouping them together so that I have less lines of
code instead of 100's of lines stating:
LblA.Visible = True
LblB.Visible = True
LblC.Visible = True
|
by: danfan46 |
last post by:
Hi!
I have a previous post on the subject that connect takes a long time.
I uninstalled db2 completely.
Installed V9.5
Installed fixpack 1
created das
created an instance
installed database sample.
|
by: Rafe |
last post by:
Hi,
I'm working within an application (making a lot of wrappers), but the
application is not case sensitive. For example, Typing obj.name,
obj.Name, or even object.naMe is all fine (as far as the app is
concerned). The problem is, If someone makes a typo, they may get an
unexpected error due accidentally calling the original attribute
instead of the wrapped version. Does anyone have a simple solution for
this?
|
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...
|
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...
| |
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...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |