Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / February 2004

Tip: Looking for answers? Try searching our database.

Overwriting file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 18 Feb 2004 19:46 GMT
I have an app that I upgrade a lot. When I install it, it overwrites a .mdb
file I use for the app. What can I do to avoid that? Maybe a dialog box
asking if the database should be overwritten, or existing should be used.

I appreciate any help I can get.

Thank you,

Steve Farmer
Dmitriy Lapshin [C# / .NET MVP] - 20 Feb 2004 17:19 GMT
Hi Steve,

You can indeed employ the CheckBoxDialog prompting the user whether s/he
wants to keep the existing database. Then use the property value(s)
corresponding to the checkbox(es) on this dialog as the input to the .mdb
file Condition property.

Signature

Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

> I have an app that I upgrade a lot. When I install it, it overwrites a .mdb
> file I use for the app. What can I do to avoid that? Maybe a dialog box
[quoted text clipped - 5 lines]
>
> Steve Farmer
Steve - 20 Feb 2004 19:10 GMT
Thank you for your reply. I added a radio button dialog. Could you please
tell me where I code the events? This dialog should only come up if the
database already exists.

Steve

> Hi Steve,
>
[quoted text clipped - 13 lines]
> >
> > Steve Farmer
Dmitriy Lapshin [C# / .NET MVP] - 23 Feb 2004 08:43 GMT
These events don't need to be coded. You should add a file search in the
Launch Conditions, then set the property corresponding to the result of that
search (it's name is set in the Properties window for the search) as the
Condition property value for the CheckBoxDialog (hmm...not sure this
property exists on the dialog level), or at least as the "Enabled" property
value for the check box displayed on this dialog.

Signature

Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Phil Wilson - 20 Feb 2004 21:58 GMT
What exactly do you mean by "upgrade"? If you have a VS setup project using
RemovePreviousVersions, you don't have much control over what happens because it
removes the old version before installing the new one. A dialog box won't really
help in this situation because there's nothing you can do with it that tells the
uninstall of the old version not to remove the database.
Signature

Phil Wilson [MVP Windows Installer]
----

> I have an app that I upgrade a lot. When I install it, it overwrites a .mdb
> file I use for the app. What can I do to avoid that? Maybe a dialog box
[quoted text clipped - 5 lines]
>
> Steve Farmer
Steve - 23 Feb 2004 15:05 GMT
Thank you for the reply. So what can I do to preserve the previous database
during installation?

Steve

> What exactly do you mean by "upgrade"? If you have a VS setup project using
> RemovePreviousVersions, you don't have much control over what happens because it
[quoted text clipped - 10 lines]
> >
> > Steve Farmer
Phil Wilson - 23 Feb 2004 17:46 GMT
Are you using RemovePreviousVersions?
Signature

Phil Wilson [MVP Windows Installer]
----

> Thank you for the reply. So what can I do to preserve the previous database
> during installation?
[quoted text clipped - 21 lines]
> > >
> > > Steve Farmer
Steve - 23 Feb 2004 21:47 GMT
Yes, I am, should I set it to false?

Steve

> Are you using RemovePreviousVersions?
> > Thank you for the reply. So what can I do to preserve the previous database
[quoted text clipped - 22 lines]
> > > >
> > > > Steve Farmer
Phil Wilson - 24 Feb 2004 18:11 GMT
No, because then you won't get an upgrade at all. RemovePreviousVersions causes
an uninstall of the old product followed by an install of the new one. The
problem isn't overwriting, the problem is that you're uninstalling the older
version and installing the new version. See if it works when you set the
Permanent property on the .mdb file when you install it. That should preserve it
on the system, and if it's been updated the incoming .mdb won't overwrite it
(Windows Installer overwrite rules don't replace data files if the modify date
is different from the creation date).

Signature

Phil Wilson [MVP Windows Installer]
----

> Yes, I am, should I set it to false?
>
[quoted text clipped - 30 lines]
> > > > >
> > > > > Steve Farmer

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.