Hello everybody,
I have been developing an application in Visual Basic.Net that queries
an SQL database every 15 minutes. My problem arises when the computer
upon which the application is running goes into standby mode. My
application continues to run, but when the "15 minutes" timer fires,
it cannot make the required connection to the database and the
application crashes.
What I really need is something to tell me the status of my computer,
to check whether it is on standby before trying to connect to the
database. Error trapping won't do because the application needs to be
able to tell the difference between physically not being connected to
the network and being connected but unable to connect to the database
because of the standby problem.
Thanks in advance,
Tom
\/\/\/\/\/\/\/ 3 3839
Hello,
"Tom Lant" <th****@ecs.sot on.ac.uk> schrieb: I have been developing an application in Visual Basic Net that queries an SQL database every 15 minutes. My problem arises when the computer upon which the application is running goes into standby mode. My application continues to run, but when the "15 minutes" timer fires, it cannot make the required connection to the database and the application crashes.
This is a VB.NET language group. Notice that you will have a better
chance to get an answer if you post to the ADO.NET newsgroup in future: news://msnews.microsoft.com/microsof...amework.adonet
Web interface: http://msdn.microsoft.com/newsgroups...amework.adonet
--
Herfried K. Wagner
MVP · VB Classic, VB.NET http://www.mvps.org/dotnet
If it's ok to manually take it out of standby mode, just fire this from
behind yourtimer and send it MonitorOnPrivat e Declare Function SendMessage
Lib "user32" Alias "SendMessag eA" _
(ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, lParam As Any) As Long
Public Enum MonitorState
MonitorOn = -1
MonitorOff = 2
MonitorStandby = 1
End Enum
Public Sub SetMonitorState (frmForm As Form, eState As MonitorState)
Dim lngResult As Long
lngResult = SendMessage(frm Form.hwnd, &H112, &HF170, eState)
End Sub
"Tom Lant" <th****@ecs.sot on.ac.uk> wrote in message
news:43******** *************** **@posting.goog le.com... Hello everybody,
I have been developing an application in Visual Basic.Net that queries an SQL database every 15 minutes. My problem arises when the computer upon which the application is running goes into standby mode. My application continues to run, but when the "15 minutes" timer fires, it cannot make the required connection to the database and the application crashes.
What I really need is something to tell me the status of my computer, to check whether it is on standby before trying to connect to the database. Error trapping won't do because the application needs to be able to tell the difference between physically not being connected to the network and being connected but unable to connect to the database because of the standby problem.
Thanks in advance,
Tom \/\/\/\/\/\/\/
Your best bet is to not let the computer go into standby in the first place.
Standby is not really a software issue. It is hardware issue. Each
implementation is different. You would have to get to the level of knowing
what make model of PC you are running on...
"Tom Lant" <th****@ecs.sot on.ac.uk> wrote in message
news:43******** *************** **@posting.goog le.com... Hello everybody,
I have been developing an application in Visual Basic.Net that queries an SQL database every 15 minutes. My problem arises when the computer upon which the application is running goes into standby mode. My application continues to run, but when the "15 minutes" timer fires, it cannot make the required connection to the database and the application crashes.
What I really need is something to tell me the status of my computer, to check whether it is on standby before trying to connect to the database. Error trapping won't do because the application needs to be able to tell the difference between physically not being connected to the network and being connected but unable to connect to the database because of the standby problem.
Thanks in advance,
Tom \/\/\/\/\/\/\/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Cherrish Vaidiyan |
last post by:
hello,
Thanx for the suggestions on my Listener query. Now i am performing a
simple work.. STANDBY DATABASE creation.
I have followed the instraction from Oracle 9i Release 1 documentation
but have some doubts. here are the basic stpes i followed.
1 Either make a new backup of the primary database datafiles or access
|
by: Frank |
last post by:
I have observed that a temporary loss of a domain controller can cause
problems creating new ado connections between a client machine running
ado and a separate sql server machine that are members of the domain.
I understand why this happens when creating connections with windows
authentication. What is a mystery is that it also sometimes effects
new connections that use "sql authentication". Below is a description
of my test scenario.
...
|
by: bwmiller16 |
last post by:
Folks -
Linux RH3, UDB 8.2 FP9.
I've got two tiny test boxes that I'm setting up to get a simple HADR
configuration built. When I start the primary I get the famous SQL1768
RC=7 and also this on the db2diag.log.
This looks to me to be more than a simple firewall issue (which I've
checked).
|
by: John J. Hughes II |
last post by:
I am using the following code to monitor a socket port. The code normally
works fine unless a network connection is lost. Since both ends of the
conversation on the same computer (normally) this causes a problem because
they can no longer connect. On my system if the network is reconnected the
two system can start communicating again but on other systems I am told they
can not.
One program is a service and the other is the user...
|
by: Martin B |
last post by:
Hallo!
I'm working with C# .NET 2.0, implementing Client/Server Applications which
are connecting via Network to SQL-Server or Oracle Databases.
To stay independent from the underlaying Database I use
System.Data.Common.DBConnection and .DBCommand.
How can I keep aware from connection losses (network not availeable,
db-server not available...)?
Are there any strategies to detect this broken connections, and how can I
| |
by: shorti |
last post by:
db2 8.1 fix pack 12 on AIX 5.3
This is a newly configured HADR machine. The HADR was up and running.
I was 'playing' around some on the standby and did a db2 deactivate and
things sort of went down hill from there.
Though the Standby machine seemed to know it was a standby it would not
connect to the primary. I could not even do a db2 get snapshot to view
the hadr status on the machine. I was wanting to do a few HADR tests
before I...
|
by: =?Utf-8?B?VGlt?= |
last post by:
I have an app that calls a webmethod. Everything works fine except when you,
the client, loses network connectivity during the request. When the
connection is lost the client applications hangs.
I tried setting the Timeout property on the client but still an error is
never raised. Is there a workaround for this?
|
by: =?Utf-8?B?Z3Jsb25n?= |
last post by:
I have a dell 1210 running XP Media ver 2002. I Have recently done a clean
reinstall of the OS. I have downloaded all of the current drivers and
windows updates. I have tried every conceviable comination of power
management settings to no avail. My Prolem: When I awake the computer from
standby mode I often (but not always) loose my connection to the internet
even though the icon indicates that I am connected. I also will loose my...
|
by: JT |
last post by:
Hi,
I've realized that my good fortune of not having my computer go into
standby mode was the result of my application accessing a file on a
shared network drive. Not going into standby is a very good thing for
my application, but I don't want users to be required to share a drive
and file just to accomplish this.
I've read in old posts in various places stating that by importing
kernel32.dll I could access a function called
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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: 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: 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...
|
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: 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: 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...
| |