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

Power QuerySuspend and VPN connections

I am trying to write a windows service that will synchronize a SQL replica in the background. Every time the laptop is opened, the service catches the resumesuspend event, checks to see if a wireless ethernet connection is available and if it is, uses rasdial to initiate a VPN connection and then synchronizes with the publisher.

The problem pops up when the user closes the lid on the laptop while the service is still synching. I catch the querysuspend event and return false, which prevents the laptop from going into standby, but the VPN connection disconnects anyway (I can only surmise that the VPN disconnects on querysuspend instead of suspend). Once the VPN disconnects, the synch fails and it's downhill from there.

Is there any way to prevent the VPN from disconnecting on querysuspend?

Is there a better approach to synching?

Thanks,

Nick
Jul 21 '05 #1
0 859

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

Similar topics

3
by: Mudge | last post by:
Hi, My hosting provider only allows me to use 50 connections to my MySQL database that my Web site will use. I don't know what this 50 connections means exactly. Does this mean that only 50...
6
by: Stephane Belzile | last post by:
Is there a way I can detect in vb.Net the power has switched to a UPS unit in case of power failure? Thanks
17
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're...
7
by: danfisher | last post by:
After a powerfailure of 10hours I have got my database server back up and the phpBB2 that a site uses is not working. Here is the error. Warning: pg_connect() unable to connect to PostgreSQL...
0
by: Nick Nelson | last post by:
I am trying to write a windows service that will synchronize a SQL replica in the background. Every time the laptop is opened, the service catches the resumesuspend event, checks to see if a...
3
by: greek | last post by:
the question is to calculate x^n(x power n) (whr n can be +ve or -ve) by using recursion. the algorithm is x= 1, n=0 1/x^n, n<0 x*x^(n-1), n>0 ...
5
by: Usman Jamil | last post by:
Hi I've a class that creates a connection to a database, gets and loop on a dataset given a query and then close the connection. When I use netstat viewer to see if there is any connection open...
2
by: ITBeamte | last post by:
short history: Power designer 12.5.0.2169 (newest one from Sybase site) version with full functionality I creare a new physical model. go to the menu "Database\Configure connections\Connection...
2
by: Salad | last post by:
FYI. You may never experience this but if you do, this may save some time debugging the problem. A person left his computer to do some other tasks and when he'd come back the links to the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...

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.