Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7044687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:26:22+00:00 2026-05-28T02:26:22+00:00

There is some old legacy vbscript code we have that needs some sort of

  • 0

There is some old legacy vbscript code we have that needs some sort of error handing in it. Having never used vbscript before, I’m at a total loss. Here is the code:

set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.4.0")
objBL.ConnectionString = "connectionstring"
objBL.KeepIdentity = false
objBL.ErrorLogFile = "E:\code\Acquity\WebOrderImport\logs\error.log"

Set fso = CreateObject("Scripting.FileSystemObject")
Set parentfolder = fso.GetFolder("E:\textdata\Acquity\AcquityWebOrders")  
Set logfile = fso.OpenTextFile("E:\code\Acquity\WebOrderImport\logs\import.log",8)
count = 0
    For each folder in parentfolder.subfolders
        logfile.writeline count & " files"
        logfile.writeline "Processing " & folder.name & " ***********************************" & now()
        count = 1
        For Each file in folder.files
            If left(file.name,6) = "Order_" then
                If left(file.name,13) = previous then
                    logfile.writeline "!!!!! SKIPPING file " & file.name & "!!!!! DUPED ORDER ID"
                Else
                    logfile.writeline "reading " & file.name        
                    objBL.Execute "E:\code\Acquity\WebOrderImport\acq_WebOrder_import.xsd", file.path                   
                    count=count+1
                End If  
            previous = left(file.name,13)
            End If
        Next
    Next    

set objBL=Nothing
logfile.writeline "Done!"
Set logfile = nothing
Set parentfolder = nothing
set fso = nothing

I’m pretty sure this line:

bjBL.Execute "E:\code\Acquity\WebOrderImport\acq_WebOrder_import.xsd", file.path

keeps throwing exceptions, and I need the code to keep running when it hits an error, rather than stopping. How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:26:22+00:00Added an answer on May 28, 2026 at 2:26 am

    To ignore errors, add On Error Resume Next before the part that can cause them. To disable the effect of “resume next”, use On Error Goto 0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have some old C code here that's built with nmake. Is there an
I'm dealing with some old @ss legacy code that was written 3 or 4
Say you have a legacy website running on an old code-base that offers certain
I have some old (~1995) legacy fortran code which is compiled with g77 compiler
I've got some (badly written) legacy code that I have to modify but I'm
I have some old code that I'm converting to use in Windows Phone. The
I have some old jsp code that uses the struts tags inside attributes, like
I'm refactoring some old JavaScript code and there's a lot of DOM manipulation going
I am visiting some old code, and there are quite a few events declared
I've found myself running back through some old 3.5 framework legacy code, and found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.