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

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.
 
Share this answer
 
research to create software and hardware
 
Share this answer
 

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