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

  • Home
  • SEARCH
  • 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 7489829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:22:56+00:00 2026-05-29T15:22:56+00:00

I have written a VBScript to extract data from Active Directory into a record

  • 0

I have written a VBScript to extract data from Active Directory into a record set. I’m now wondering what the most efficient way is to transfer the data into a SQL database.

I’m torn between;

  • Writing it to an excel file then firing an SSIS package to import it or…
  • Within the VBScript, iterating through the dataset in memory and submitting 3000+ INSERT commands to the SQL database

Would the latter option result in 3000+ round trips communicating with the database and therefore be the slower of the two options?

  • 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-29T15:22:57+00:00Added an answer on May 29, 2026 at 3:22 pm

    Sending an insert row by row is always the slowest option. This is what is known as Row by Agonizing Row or RBAR. You should avoid that if possible and take advantage of set based operations.

    Your other option, writing to an intermediate file is a good option, I agree with @Remou in the comments that you should probably pick CSV rather than Excel if you are going to choose this option.

    I would propose a third option. You already have the design in VB contained in your VBscript. You should be able to convert this easily to a script component in SSIS. Create an SSIS package, add a DataFlow task, add a Script Component (as a datasource {example here}) to the flow, write your fields out to the output buffer, and then add a sql destination and save yourself the step of writing to an intermediate file. This is also more secure, as you don’t have your AD data on disk in plaintext anywhere during the process.

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

Sidebar

Related Questions

I have a classic asp webpage written in vbscript that outputs the results from
have written a stochastic simulation in Java, which loads data from a few CSV
I am trying to call a method I have written in C# from VBScript.
I have written a VBScript to enumerate events from the event log on a
I have written an AIR Application that downloads videos and documents from a server.
I have written a Java program which I package and run from a JAR
Context: Windows7, VBScript, ADODB and ADOX. I have written some VBScript code which creates
I have a custom built CRM that is 99% written in Classic ASP/VBScript. Currently
I have written an application called Abacus and released it as free software. Now
I have written a small web app to collect some data and store it

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.