473,396 Members | 2,013 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,396 software developers and data experts.

Loss of network connection on Standby.

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
\/\/\/\/\/\/\/
Nov 20 '05 #1
3 3818
Hello,

"Tom Lant" <th****@ecs.soton.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
Nov 20 '05 #2
If it's ok to manually take it out of standby mode, just fire this from
behind yourtimer and send it MonitorOnPrivate Declare Function SendMessage
Lib "user32" Alias "SendMessageA" _
(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(frmForm.hwnd, &H112, &HF170, eState)
End Sub
"Tom Lant" <th****@ecs.soton.ac.uk> wrote in message
news:43*************************@posting.google.co m...
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
\/\/\/\/\/\/\/

Nov 20 '05 #3
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.soton.ac.uk> wrote in message
news:43*************************@posting.google.co m...
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
\/\/\/\/\/\/\/

Nov 20 '05 #4

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

Similar topics

0
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...
2
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...
1
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...
0
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...
3
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...
6
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...
6
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. ...
0
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...
6
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...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.