3

You can save a SQL Server 2000 DTS package as a VB .BAS file. Is is possible to open a .BAS file in SQL Server Enterprise Manager (or some other way) to add the DTS package to the server? Initally, it appears that SQL Server only lets you import .DTS files.

Jim
  • 10,765
  • 17
  • 74
  • 114

3 Answers3

4

Actually, it is possible although it's fiddly:

Running a DTS Package Saved as a Visual Basic File

Ryan Lundy
  • 187,365
  • 35
  • 174
  • 206
3

No, it is not possible to do this. Saving to a .BAS file is one-way only. You can, however, compile the file with VB6 and run it as an executable from another DTS package. You can also modify it, perhaps adding CL options to use it as a standalone program.

EDIT: Ben (below) has found a link on the MSDN web site describing this process. +1.

ConcernedOfTunbridgeWells
  • 59,622
  • 15
  • 138
  • 193
1

Yes, it is possible, follow the link in the prior answer. Just one other little thing...when you uncomment the goPackage.SaveToSQLServer, you can use the flags parameter to specify a trusted connection like so:

goPackage.SaveToSQLServer "(local)", , , DTSSQLStgFlag_UseTrustedConnection

That way you don't have to expose a password in your code.

RGL
  • 11
  • 1