Saving DTS as .BAS, but how to load it?

  • I can save a DTSpackage as DSTpack.BAS. But, how can I load this file again in my DTS-editor? I can do this with files with .DTS extension.

    Greetz,
    Hans Brouwer

  • See this link on this site:

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=19&messageid=18439


    ------------------------------
    The Users are always right - when I'm not wrong!

  • Look at your VBA code. Do a find on the word "execute". Somewhere in that region of the code is a section where you are given the choice of loading and executing OR saving the DTS package. Comment out the choice you don't want, then run the VBA.

    Hope this helps!

  • No you can't, you can only run it as VB code.

     

  • Done it many times without any problems.

     

    --------------------
    Colt 45 - the original point and click interface

  • Yeah, why would you say it can't be done when clearly it can.  If you read the file created while saving the .bas file you'll see.....

    '---------------------------------------------------------------------------

    ' Save or execute package

    '---------------------------------------------------------------------------

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

    'goPackage.Execute

    'tracePackageError goPackage

    goPackage.Uninitialize

    'to save a package instead of executing it, comment out the executing package lines above and uncomment the saving package line

    Set goPackage = Nothing

    Set goPackageOld = Nothing

     

    It can be placed into VBA as well, as long as a refernce to Microsoft DTSPackage Object Library is there, so you can run it in Access instead of VB and it works great.

    -Mackin

     

     

  • if you save a dtspackage as vba file, can you re-open it in the dts gui?

     

  • The DTS GUI is looking for an object that fits the DTS object model. The VB file has no information about the object model in it.

    Modify the "Save" line in the VB code to save the package to SQL Server, or to a .dts file. Then run the VB code and you'll have something to open in the GUI.

     

    --------------------
    Colt 45 - the original point and click interface

  • phil,

    The orginal question "I can save a DTSpackage as DSTpack.BAS. But, how can I load this file again in my DTS-editor? I can do this with files with .DTS extension."

    This is impossible to reopen bas file onto dts editor.

    But from what you said it's like having two versions...what's the point?

     

     

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply