Error handling in SP

  • Don't worry about the DTS stuff, once you get the data into seperate files its point-click stuff.

    Have you done anything with VBScript before?

     

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

  • No Phill....No Idea of that..

  • Ok, first things first. Run off to the MSDN website and download the "Microsoft Windows Script 5.6 Documentation" and "Microsoft Windows Script Debugger" from this page,

    http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp

    Make sure you download the correct Debugger otherwise it won't work properly.  The XP/2000 version is usually inthe "Related Links" section.

    You install the debugger on the dev machine running SQL Server and turn on Just-in-Time debugging in DTS. Then when your script hits an error it will lauch the debugger to show you exactly  where the error is occurring. You can also print out variables and such like a regular debugger.

    The big annoyance with the debugger is that it's read only. So if you have an error you can't rectify by altering the values of the variables, then you have to end the debugging session, effectively ending your script, before you can go back into the code to make any changes and restart the script.

    Install the documentation on your workstation and read up on the FileSystemObject.

    Basically you want to,

    - open a file

    - read a line

    - capture the tablename from the line you've read

    - write the line (minus the tablename) to a file with the tablename as the filename

    - read another line, etc..., etc...

    The documentation and examples on the FileSystemObject should give you a good start. Once you get into the hang of it is really very simple

     

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

  • These two articles might be useful reading as well.

    http://msdn.microsoft.com/library/en-us/script56/html/sgWorkingWithFiles.asp?frame=true

    http://msdn.microsoft.com/library/en-us/dnclinic/html/scripting03092004.asp?frame=true

    And this has a ton of code that you could grab some examples from.

    http://msdn.microsoft.com/library/en-us/script56/html/sgFSOSample.asp?frame=true

     

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

Viewing 4 posts - 16 through 18 (of 18 total)

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