There are three ways to deploy your package. Below are each of the options.Option 1
Deploy your package file through the DDT run-time environment. See the image below for a point of reference.
Option 2
This option is geared more towards installations. You can programmatically deploy a package using the a class that may look something like this:
Imports MicroFour.StrataFrame.DBEngine.SQL
Public Class SetupMenu
''' <summary>
''' Declare the variable with events so that we can capture progress indicators
''' </summary>
''' <remarks></remarks>
Private WithEvents _DataDeploy As DatabaseMigrator
''' <summary>
''' Deploy the data to the specified server
''' </summary>
''' <remarks></remarks>
Private Sub DeployData()
'-- Create a new migrator instance
_DataDeploy = New DatabaseMigrator("localhost", False, Me, "sa", "mypassword")
'-- Deploy the structure to the SQL server
_DataDeploy.DeployMetaData("c:\MyPackageFile.pkg", "")
End Sub
''' <summary>
''' Captures any detailed information about the progress of the deployment
''' </summary>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub _DataDeploy_ProgressUpdate(ByVal e As MicroFour.StrataFrame.DBEngine.SQL.SQLManagerEventArgs) Handles _DataDeploy.ProgressUpdate
Me.ProgressBar.Value = e.ProgressPercent
Me.lblTitle.Text = e.Title
Me.lblMessage.Text = e.Message
End Sub
Private Sub SetupMenu_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.GotFocus
'WinAPI.SetForegroundWindow(Me.Handle.ToInt32())
'Me.BringToFront()
WinAPI.BringWindowToTop(Me.Handle.ToInt32())
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MenuSystem.UDPMenuSession.SendMessage(UDPMessageType.VisualFoxProCommand, Me.Textbox1.Text)
End Sub
End Class
Option 3
This is similar to Option 2, but you do not have to use your own dialogs. You can use the same dialogs that you see witin the DDT run-time environment. This is how you would call them.
Dim loDeploy As New MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain("c:\MyPackage.pkg", "")
loDeploy.ShowDialog()