Click here to Skip to main content
13,048,337 members (113,248 online)
Rate this:
Please Sign up or sign in to vote.
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 7:48am
Rate this: bad
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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

research to create software and hardware

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 10 Jul 2014
Copyright © CodeProject, 1999-2017
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