dbTalk Databases Forums  

Re: Restore a DTS Packaga Saved As Visual Basic File?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: Restore a DTS Packaga Saved As Visual Basic File? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Darren Green
 
Posts: n/a

Default Re: Restore a DTS Packaga Saved As Visual Basic File? - 05-18-2004 , 12:57 PM






Open the VB module file in VB and add a reference to the DTS Package Object
Library. Scroll to the bottom of Sub Main and you will find two options,
either go_Package.Execute or go_Package.SaveToSQLServer. You want to call
the SaveToSQLServer method, so ensure that is setup correctly with server
name and credentials, and the Execute call is commented out.

Run the project.


--
Darren Green
http://www.sqldts.com

"Anonymous" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
SQL Server 2000 DTS package deleted from MSDB. No MSDB backkup. DTS
package previously saved as a Visual Basic file (vaulted in SourceSafe). Is
there a way to restore the DTS package to the SQL Server MSDB using only the
Visual Basic file?




Reply With Quote
  #2  
Old   
Anonymous
 
Posts: n/a

Default Re: Restore a DTS Packaga Saved As Visual Basic File? - 05-18-2004 , 01:46 PM






Darren

1) opened the saved DTS Visual Basic file in the following environment

Visual Basic 6.0 - Visual Studio 6.
Project1 (Project_DTS_Test.vbp
Module1 (SMT_SE~1.BAS

2) Attempted to add Reference to the project: [Microsoft DTSPackage Object Library] but got the following error message.

'Name conflicts with existing module, project or object library

I am a newbie when it comes to using VB modules/projects so I could use a little help to get to your next step

Thank

Mr. Anonymous

Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: Restore a DTS Packaga Saved As Visual Basic File? - 05-25-2004 , 01:45 AM



Don't use an existing project. Just double click the bas file and this
should open VB for you, creating an empty project, or if you are using an
existing project, don't add the reference if already present, or at least a
different version of it.


--
Darren Green
http://www.sqldts.com

"Anonymous" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Darren,

1) opened the saved DTS Visual Basic file in the following environment:

Visual Basic 6.0 - Visual Studio 6.0
Project1 (Project_DTS_Test.vbp)
Module1 (SMT_SE~1.BAS)

2) Attempted to add Reference to the project: [Microsoft DTSPackage Object
Library] but got the following error message..

'Name conflicts with existing module, project or object library'

I am a newbie when it comes to using VB modules/projects so I could use a
little help to get to your next step.

Thanks

Mr. Anonymous



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.