Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

1 solution

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
 
Share this answer
 
Comments
Prasad_Kulkarni 20-Mar-13 2:31am    
Yep. A 5!
Sergey Alexandrovich Kryukov 20-Mar-13 2:36am    
Thank you, Prasad.
—SA
udusat13 20-Mar-13 2:46am    
Thanks for your reply.but please explain.
Sergey Alexandrovich Kryukov 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 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 ?

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900