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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:15:52+00:00 2026-05-24T08:15:52+00:00

I am developing an online tool in .NET 4 to read potentially large (thousands

  • 0

I am developing an online tool in .NET 4 to read potentially large (thousands of rows) Excel pages into a DataTable and then using SqlBulkCopy.WriteToServer() to upload to a matching Sql Server 2000 (soon to be 2008) table. It is only for use within my company, so I don’t need to worry too much about securing it for external use.

I have got it working like a dream, and is naturally much quicker than the row by row inserts I was performing before. But now I am asking myself if it is the right approach.

Firstly, from a business point of view, all of the other data access is through Stored Procedures with exec permissions granted to the user, whereas this requires Table level security.

Secondly, most online documentation mentions that this is more of a tool for one off operations rather than the daily use mine would have.

I can’t find many references to the negatives of using SqlBulkCopy. Are there any security issues or other issues that I should be worried about? Are there any alternative approaches that I could consider? As with everything, my main aim is to get it working as quickly as possible while being secure and the “correct” approach.

Many thanks.

  • 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-24T08:15:53+00:00Added an answer on May 24, 2026 at 8:15 am

    I’d say you are fine with this choice. It is being used for performance benefit over standard insert statements with a regular command, non-batched calling. This is why it may differ from the “standard” approach with stored procedures.

    I’d say security isn’t too much of a concern over simply validating the input. All it appears you are doing with it is transferring data directly into a table, not running any custom SQL along side.

    As for running it more than once, we use it in production code for large data actions in multiple places, multiple times – the performance benefit outweighs the slightly different DAL code you have to use to get it.

    The only potential issue is memory pressure. If you create a DataTable from an object graph (something we do) you get a second copy of that data in memory (albiet, short lived). In some places we have changed the code from using a DataTable to use a custom class that implements IDataReader over the object graph (I say graph, usually a couple of flat lists). This avoids the memory pressure.

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

Sidebar

Related Questions

I am developing an online strategy game using .Net v2. Although the game is
I am currently developing an online Auction system using ASP.NET 3.5 and SQLServer 2008.
Recently I am developing a online platform using ASP.NET MVC 3, and I have
I am developing an online exam using JSP/Servlets which is nearing completion. I'm planning
I am developing an online examination using servlets/jsp.I need to add a count down
I'm developing an online tool that involves image editing. Pixlr is my first choice
using Builder online tool https://builder.addons.mozilla.org/ to build and test my extension now that I
Hey, I'm developing an online test using servlets/jsps and was wondering how to create
i am developing an online book store using php and mysql. now i want
I am developing an online store using asp mvc 3 and I am using

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.