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

Problem with Windows-Shutdown generated by a UPS

I have the following configuration

VS-Studio 2003 Application
Local SQL-Database

When the UPS starts a shutdown of the unattended PC the following happens.

The local database SQL-Database stops very quickly.
When the application is closing ,
I have programmed to store the latest used values in database.

But now I would like to skip storing , because the database has already
shutdowned, and I have programmed to visualize
the datbase-Error on screen, that normally is correct, except this situation
!!

How can I recognize, that the Application is not stopped by user click, but
by Windows-Shutdown ( generated by a UPS )
THX for any help
Peter Stojkovic
Nov 21 '05 #1
1 852
Hi,

Take a look at the systemevents class sessionending.

http://msdn.microsoft.com/library/de...ndingtopic.asp

Ken
------------------
"Peter Stojkovic" <Pe*************@gmx.net> wrote in message
news:uS**************@tk2msftngp13.phx.gbl...
I have the following configuration

VS-Studio 2003 Application
Local SQL-Database

When the UPS starts a shutdown of the unattended PC the following happens.

The local database SQL-Database stops very quickly.
When the application is closing ,
I have programmed to store the latest used values in database.

But now I would like to skip storing , because the database has already
shutdowned, and I have programmed to visualize
the datbase-Error on screen, that normally is correct, except this
situation !!

How can I recognize, that the Application is not stopped by user click,
but by Windows-Shutdown ( generated by a UPS )
THX for any help
Peter Stojkovic

Nov 21 '05 #2

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

Similar topics

3
by: Trevor Fairchild | last post by:
I am making a program that categorizes pictures. The picture paths are stored in an Access Database, vb6 connects using adodc controls. This program works specifically with .jpg files. It will be...
13
by: Wolfgang Kaml | last post by:
Hello All, I have been researching newsgroups and knowledgebase all morning and not found a solution that would solve the problem I have. I am having an ASP or ASPX web page that implement a...
1
by: bob | last post by:
I have created a simple Windows service in VB.Net which installs fine using InstallUtil.exe to install it to, for example "c:\test", or "c:\Windows\YellowBanana", but if I install it to "c:\Program...
7
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
3
by: pnp | last post by:
Hi all, I have developed an app in C# and I have used some of the Infragistics components in it. The problem is that while one is playing with the windows within the mdi container exceptions occur...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
2
by: Adam Hartshorne | last post by:
Hi All, I have the following problem. I have just installed visual studio 2003 (v7.1) on a new laptop. I also have the same version installed in a desktop pc. As a test, i tried compiling some...
1
by: Mahesh Devjibhai Dhola | last post by:
Hi, Scenario: The webservice was developed on windows 2000 Pro and deployed previously on windows XP pro for testing. We have tested for many days. The client for that service was 30+ and...
2
by: =?Utf-8?B?aGVsZmk=?= | last post by:
Hi all, I have replied with my own questions to an older post entry but after a while I thought it's better to start a new thread based on the previous one. Perhaps with the new thread I will...
6
by: Scott Gravenhorst | last post by:
Windows XP SP3 My application is set to open a SaveFile dialog when an exit is requested. When I click the app's close button, the save dialog opens, but when I click to change the folder, the...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
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...

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.