Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

MS SQL

Posted Feb 27, 2000

Data Transformation Services (DTS) - Page 2

By DatabaseJournal.com Staff

  • As with the implementation for the CustomTask object, there is a corresponding implementation required for the user interface. Add the CustomTaskUI implementation to the declaration section of your existing Class module
'Required for CustomTask with User Interface
Implements DTS.CustomTaskUI

  • The CustomTaskUI object has seven methods, all of which must be defined regardless of usage

Private Sub CustomTaskUI_Initialize(ByVal pTask As Task)
    Dim oCustomTask As MyCustomTaskUI.CustomTask
 'Set current task to a global task variable
 'This is used by the form to retrieve values
Set oTask = pTask
    
 'Set the Default Task values here
MsgBox "CustomTaskUI_Initialize"
End Sub

Private Sub CustomTaskUI_Help(ByVal hwndParent As Long)
 'Not Used
End Sub

Private Sub CustomTaskUI_Delete(ByVal hwndParent As Long)
    MsgBox "CustomTaskUI_Delete"
End Sub

Private Sub CustomTaskUI_CreateCustomToolTip(ByVal hwndParent As Long, _
  ByVal x As Long, ByVal y As Long, plTipWindow As Long)
 'Not Used
End Sub

Private Sub CustomTaskUI_New(ByVal hwndParent As Long)
 ' Called when you add the task to a Package
MsgBox "CustomTaskUI_New"
    frmCustom.Show vbModal
End Sub

Private Sub CustomTaskUI_Edit(ByVal hwndParent As Long)
 ' Called when you edit the Task, i.e. Double-Click the icon
MsgBox "CustomTaskUI_Edit"
    frmCustom.Show vbModal
End Sub

Private Sub CustomTaskUI_GetUIInfo(pbstrToolTip As String, _
  pbstrDescription As String, _
  plVersion As Long,   pFlags As DTSCustomTaskUIFlags)
 'Not Used
End Sub

  • The interface is a standard Form object. Add a form to your project, ensuring the name is referenced correctly in the New and Edit methods. The examples above use a formed named frmCustom.

  • In the Initialise method, you will notice that our CustomTask object, pTask, is passed to the user defined variable oTask. It is very important that oTask is available to the Form, as it is used to gain reference to the underlying CustomTask object, from which we can read and write the CustomTask properties. To do this I recommend adding Module to your project, with the following code

'The variables declared below are used to pass values
'between the Class and the Form
Public oTask As DTS.Task

Next we must add code to the form, and finally compile and register the CustomTask -



MS SQL Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM