StrataFrame Forum

Deploying a PackageIt file

http://forum.strataframe.net/Topic4030.aspx

By Vikram Saxena - 11/1/2006

I am quite new to DDT so pls pardon my lack of knowledge on DDT. I have made a DDT Package-IT File, but am not able to figure out how to deploy on SQL 2000 database on my client's server using the Package-IT file.  
By Trent L. Taylor - 11/1/2006

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()

By Vikram Saxena - 11/1/2006

Hi,

Thanks. are these options documented in the DDT Help File ? 

By Trent L. Taylor - 11/1/2006

At first glance I am not seeing this.  It must have been left out of the compile help file.  We will get this addressed Blush  sorry for any trouble.
By Vikram Saxena - 11/1/2006

Is there any method of deploying on SQL Servers remotely located for web applications. I definitely cant install DDT on the database server.
By Trent L. Taylor - 11/1/2006

That is when you will want to use the Option 2 mentioned above.