Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WinForm
Hi Expert,
 
I am working in winform c# & sql server.
 
I am using datagridview (as excel ) for data entry.There is fixed structure. And storing these entries in sql server 2005.

And is working fine for me.
 
Now problem is , How to save temp-file like Word does when automatic shutdown,poweroff etc ,And i want to store these datagridview data as it is .
 
I want fastest way to save and backup. I tried in excel but working slow for me.
 
Please Help me to solve this problem.Thanks in adv.
 
And sorry for bad english.
Posted 19-Mar-13 21:26pm
udusat131.4K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can do it by handling system events using the class Microsoft.Win32.SystemEvents:
http://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.aspx[^].
 
—SA
  Permalink  
Comments
Prasad_Kulkarni at 20-Mar-13 2:31am
   
Yep. A 5!
Sergey Alexandrovich Kryukov at 20-Mar-13 2:36am
   
Thank you, Prasad.
—SA
udusat13 at 20-Mar-13 2:46am
   
Thanks for your reply.but please explain.
Sergey Alexandrovich Kryukov at 20-Mar-13 2:58am
   
Sure. What part of it do you want me to explain? Do you know how to handle events? This is all what matters.
—SA
udusat13 at 20-Mar-13 3:08am
   
How to store datagridview entries entered during powerloss and which format( like Excel,word,sql) ?
 
And
 
Should i use Microsoft.Win32.SystemEvents or FormClosing event ?
Sergey Alexandrovich Kryukov at 20-Mar-13 3:16am
   
I would suggest XML. Please read this:
http://msdn.microsoft.com/en-us/library/ms733127.aspx
—SA
Menon Santosh at 20-Mar-13 3:37am
   
Nice Solution
Sergey Alexandrovich Kryukov at 20-Mar-13 9:15am
   
Thank you, Menon.
Probably, this is the only one, is it not?
—SA
Menon Santosh at 21-Mar-13 8:22am
   
You are right :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 OriginalGriff 120
3 PIEBALDconsult 110
4 BillWoodruff 85
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 20 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100