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 |