VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simple step to Run DTS SQL Server in VB

by Edi Herdiawan (1 Submission)
Category: OLE/COM/DCOM/Active-X
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 14th June 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Simple step to Run DTS SQL Server in VB

API Declarations


1. After ur create a DTS on SQL server, save it as VB script, it will be save as VB Module, extention file is BAS
2. Add it as Module on ur VB project
3. Open it and go to top line and find Private procedure with name Main(), and rename it with ur own name as Public procedure , such as DTS_1
4. Add command button to run public procedure DTS_1
5. Add reference on ur project for ;
- Microsoft dts custom task library
- Microsoft  dtsdatapump scripting object
- Microsoft  dts package object library


Rate Simple step to Run DTS SQL Server in VB



Option Explicit
Public goPackageOld As New DTS.Package
Public goPackage As DTS.Package2

'Private Sub Main() : '-----> rename this name with your own name as PUBLIC procedure, such as DTS_1
Public Sub DTS_1()
        Set goPackage = goPackageOld
---
--
--
end sub

'==========Now Goto your VB Form=============
'and add one commaand button to call that DTS, here the coding 

Private Sub Command1_Click()
  DTS_1
 End
End Sub

======Good Luck=======


Download this snippet    Add to My Saved Code

Simple step to Run DTS SQL Server in VB Comments

No comments have been posted about Simple step to Run DTS SQL Server in VB. Why not be the first to post a comment about Simple step to Run DTS SQL Server in VB.

Post your comment

Subject:
Message:
0/1000 characters