MDDeployMain dialog returning OK when clicking Cancel button, why?


Author
Message
Edhy Rijo
E
StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,



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?



Am I missing some other property here that will let me know if the update completed or the user decided to cancel the process?



Thanks!

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Bump....Smile

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.



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.
Edhy Rijo
E
StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thanks Trent.



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.

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,



I am testing the new SF 1.7.0.6 and item 2528 is still returning "Cancel" instead of "OK".



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.



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:





'-- Create the deployment form

Dim loDeploy As MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain

Dim lcFullFileName As String = IO.Path.Combine(IO.Path.GetDirectoryName(Reflection.Assembly.GetEntryAssembly.Location), DDTPackageName)

loDeploy = New MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain(lcFullFileName, DDTPackagePassword)

With loDeploy

.ViewSecurityKey = "UpdateDatabase"



UpdateDatabase = .ShowDialog() ' This is returning DialogResult.Cancel all the time.

.Close()

.Dispose()

End With



Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)StrataFrame Developer (13K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Edhy,

Make sure that your assembly is being overwritten or that you didn't build old source code.  I am pretty confident on this one.  I will double-check tomorrow, but I made the change and tested it after you made this post.  Like I said, I will double check, but I wouldn't be surprised if something didn't get overwritten.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search