Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-CE C# DataGridView Forms , +
Hi everyone!
 
Is it possible to use the SaveFileDialog in Visual Studio 2012 to allow the user to save a .sdf file anywhere they want to? That's what I mean by "exporting" the .sdf file out of the project location (or installed directory) when the program is installed on an end-user's computer. Or is savefiledialog only limited to text-based files.
 
We are making an administrative side of the 1st part of the project that I began on and the reason for needing to export the .sdf file so the administrators can upload the .sdf file so the 1st part of the project can detect changes and download the .sdf file automatically and update the database.
Posted 13-Mar-13 8:48am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can use SaveFileDialog for any type of file.
 
Some unsolicited advice
I would be cautious about allowing your end-user to save your database file anywhere they want. After a while, you may end up with copies in multiple places. An option would be to automatically save the copy to a location coded into your application. Better yet (much better!), add a LastChanged DateTimestamp to each table in your database and use that to determine which rows have been updated since the last check. Set LastChanged to NOW() whenever you do an INSERT or UPDATE.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

research to create software and hardware
  Permalink  

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

  Print Answers RSS
0 Maciej Los 295
1 OriginalGriff 249
2 Sergey Alexandrovich Kryukov 205
3 Aajmot Sk 197
4 Sinisa Hajnal 176
0 OriginalGriff 7,800
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 10 Jul 2014
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