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 7857281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:59:29+00:00 2026-06-02T20:59:29+00:00

I was looking at these examples on Microsoft.com here: http://support.microsoft.com/kb/316005 http://msdn.microsoft.com/en-us/library/aa225754%28v=sql.80%29.aspx But it’s saying

  • 0

I was looking at these examples on Microsoft.com here:

http://support.microsoft.com/kb/316005

http://msdn.microsoft.com/en-us/library/aa225754%28v=sql.80%29.aspx

But it’s saying in part of it’s steps that VBScript code has to be executed, and I wasn’t able to find where the VBScript should be executed. Is it possible to be executed in SQL Server itself?

The code from the site looks something like this:

 Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
 objBL.ConnectionString = "provider=SQLOLEDB.1;data source=MySQLServer;
                           database=MyDatabase;uid=MyAccount;pwd=MyPassword"
 objBL.ErrorLogFile = "c:\error.log"
 objBL.Execute "c:\customermapping.xml", "c:\customers.xml"
 Set objBL = Nothing

This looks like it could be executed in classic asp or something, but I prefer to keep it inside SQL Server. Does anyone know how to execute something like this all with-in SQL Server? or does anyone have a better method for Bulk import XML into SQL server?

  • 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-06-02T20:59:31+00:00Added an answer on June 2, 2026 at 8:59 pm

    SQL Server is capable of reading XML and inserting it as you need. Here is an example of an XML file and insertion pulled from here:

    XML:

    <Products>
      <Product>
        <SKU>1</SKU>
        <Desc>Book</Desc>
      </Product>
      <Product>
        <SKU>2</SKU>
        <Desc>DVD</Desc>
      </Product>
      <Product>
        <SKU>3</SKU>
        <Desc>Video</Desc>
      </Product>
    </Products>
    

    Insert statement that is parsing the XML:

    INSERT INTO Products (sku, product_desc) 
    SELECT X.product.query('SKU').value('.', 'INT'),
           X.product.query('Desc').value('.', 'VARCHAR(30)')
    FROM ( 
    SELECT CAST(x AS XML)
    FROM OPENROWSET(
         BULK 'C:\Products.xml',
         SINGLE_BLOB) AS T(x)
         ) AS T(x)
    CROSS APPLY x.nodes('Products/Product') AS X(product);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking at table on http://msdn.microsoft.com/en-us/library/y1z022s1%28v=vs.80%29.aspx#_core_collection_shape_features I can not see a MFC collection for the
EDIT: I found an article that lists exactly what I needed: http://msdn.microsoft.com/en-us/library/ms646309(v=vs.85).aspx Thanks for
Background: Trying to implement a list in app.config as per these examples: http://jopinblog.wordpress.com/2007/04/20/custom-configurationsections-in-net-20-config-files/ http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/0f3557ee-16bd-4a36-a4f3-00efbeae9b0d
Im looking to make my own implementation of these Identicons or Gravatars found here
I was looking for a C++ library to read/write Microsoft Excel files. I found
I'm putting together my first web page, and I've been looking at these FTP
I'm looking for a tutorial explaining how to work with these 3 technologies, found
I'm looking for a Vim plugin that can do these kind of thing. Let's
I am looking for something very close to an application server with these features:
I was recently looking to practice utilizing dictionaries in python and stumbled across these

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.