﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Database Deployment Toolkit » Database Deployment Toolkit (How do I?)  » MDDeployMain dialog returning OK when clicking Cancel button, why?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 01:38:35 GMT</lastBuildDate><ttl>20</ttl><item><title>MDDeployMain dialog returning OK when clicking Cancel button, why?</title><link>http://forum.strataframe.net/FindPost25459.aspx</link><description>Hi Trent,&lt;br&gt;
&lt;br&gt;
Implementing the MMDeployMain.vb class I need to know if the status of the database update, I am assuming that the cmdCancel button will return Windows.Forms.DialogResult.Cancel but instead is returning Windows.Forms.DialogResult.OK, why?&lt;br&gt;
&lt;br&gt;
Am I missing some other property here that will let me know if the update completed or the user decided to cancel the process?&lt;br&gt;
&lt;br&gt;
Thanks!</description><pubDate>Sun, 31 Jan 2010 18:44:57 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: MDDeployMain dialog returning OK when clicking Cancel button, why?</title><link>http://forum.strataframe.net/FindPost25677.aspx</link><description>Edhy,&lt;/P&gt;&lt;P&gt;Make sure that your assembly is being overwritten or that you didn't build old source code.&amp;nbsp; I am pretty confident on this one.&amp;nbsp; I will double-check tomorrow, but I made the change and tested it after you made this post.&amp;nbsp; Like I said, I will double check, but I wouldn't be surprised if something didn't get overwritten.</description><pubDate>Sun, 31 Jan 2010 18:44:57 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: MDDeployMain dialog returning OK when clicking Cancel button, why?</title><link>http://forum.strataframe.net/FindPost25672.aspx</link><description>Hi Trent,&lt;br&gt;
&lt;br&gt;
I am testing the new SF 1.7.0.6 and item 2528 is still returning "Cancel" instead of "OK".&lt;br&gt;
&lt;br&gt;
At any rate I am using the DatabaseMigrator to automate the database update without user intervention and in other place I am using the MDDeployMain to have more control of what to be deployed.&lt;br&gt;
&lt;br&gt;
I looked at the source in MDDeployMain.vb in the cmdCancel.Click and noticed that you are returning the DialogResult.OK, but in my testing code it is still returning "Cancel".  Here is my code, probably I am doing something wrong:&lt;br&gt;
&lt;br&gt;
[codesnippet]&lt;br&gt;
  '-- Create the deployment form&lt;br&gt;
            Dim loDeploy As MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain&lt;br&gt;
            Dim lcFullFileName As String = IO.Path.Combine(IO.Path.GetDirectoryName(Reflection.Assembly.GetEntryAssembly.Location), DDTPackageName)&lt;br&gt;
            loDeploy = New MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain(lcFullFileName, DDTPackagePassword)&lt;br&gt;
            With loDeploy&lt;br&gt;
                .ViewSecurityKey = "UpdateDatabase"&lt;br&gt;
&lt;br&gt;
                UpdateDatabase = .ShowDialog() ' This is returning DialogResult.Cancel all the time.&lt;br&gt;
                .Close()&lt;br&gt;
                .Dispose()&lt;br&gt;
            End With&lt;br&gt;
[/codesnippet]</description><pubDate>Sun, 31 Jan 2010 14:36:01 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: MDDeployMain dialog returning OK when clicking Cancel button, why?</title><link>http://forum.strataframe.net/FindPost25501.aspx</link><description>Thanks Trent.&lt;br&gt;
&lt;br&gt;
I am using the MMDeployMain.vb class because I needed to implement this in a quick fashion to be polished later using the DatabaseMigrator class based on the sample which would have taken more time.</description><pubDate>Thu, 07 Jan 2010 19:47:51 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: MDDeployMain dialog returning OK when clicking Cancel button, why?</title><link>http://forum.strataframe.net/FindPost25486.aspx</link><description>This dialog is allowed for your use, however it was actually created for internal use and then exposed. You could have gotten around this by using the DatabaseMigrator class which is the actual intent versus the MMDeployMain.  If you will recall, there is also a sample that you could have copied over that would get you 90% of the way there.&lt;br&gt;
&lt;br&gt;
At any rate, I have changed the Cancel button to return the appropriate result which will be available in the next update which we are working on for release.</description><pubDate>Thu, 07 Jan 2010 08:31:02 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: MDDeployMain dialog returning OK when clicking Cancel button, why?</title><link>http://forum.strataframe.net/FindPost25480.aspx</link><description>Bump....:)</description><pubDate>Mon, 04 Jan 2010 15:06:19 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>