dbTalk Databases Forums  

Debugging?

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


Discuss Debugging? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Keith
 
Posts: n/a

Default Debugging? - 04-19-2006 , 12:55 PM






All my VB experience is from using VBA inside excel macros, and some
standalone VB scripts that were written and debugged by using msgbox style
displays. I am wanting to have something like the VBE load when I am
debugging DTS active X scripts.

I have Win2000 for my OS.
I have VB6 studio loaded but the install might not be complete. (never used)
I have Microsoft Script debugger loaded from before VB6 was loaded. (never
used)
I am running SQL Server 2000.

I have searched help and found that I must have the DTS property set with
a check next to "Turn on just in time debugging". From what I read in the
help files, the stop statement SHOULD load the code into the debugger.

For the code listed below(inside a DTS: Active X Script task), the STOP
statement is ignored? (the empty access database IS being deleted and
created when the script runs.) What do I need to do so that I can activate a
debugger when running a DTS package. I need to test more complex code.

'************************************************* ***********
' Visual Basic ActiveX Script
'************************************************* ***********Dim oCatalog

stop

Dim fso, sFilename
Set fso = CreateObject("Scripting.FileSystemObject")

sFilename = "C:\JKTemp.mdb"
If fso.FileExists(sFilename) Then fso.DeleteFile sFilename

Set oCatalog = CreateObject("ADOX.Catalog")
oCatalog.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\JKTemp.mdb"
Set oCatalog = Nothing

Function Main()
stop
Main = DTSTaskExecResult_Success
End Function

--
Regards,
John

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.