Solved

VB.net Excel Add-in Fastest way to validate data against a SQL database

Posted on 2014-09-24
3
463 Views
Last Modified: 2014-09-25
Hi

I have an Excel add-in (VB.net) that is used to upload data to a SQL table.
The process requires a number of checks against other SQL tables for eg machine part number
before it is uploaded. This slows things down a lot.
Is there a way to get the data to the server first (without creating additional tables) to speed
up things?
Or would it be better to pull a datatable down from SQL?
What code would I use?
Thanks
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40343660
Maybe you need to rethink about that process.
Why it's Excel doing all the work? Why not pass the hard work to SQL Server?
0
 
LVL 66

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 40343788
>Is there a way to get the data to the server first (without creating additional tables) to speed
 up things?
A vastly better idea would be to first load the data into SQL Server using a 'staging' table, or more than one table if needed, without validations.   I usually prefix these tables ssis_ or stg_.

Then you can write and execute Stored Procedures code to perform any data validations / JOINs / whatever in the staging table, before inserting into the ultimate destination table.
0
 

Author Closing Comment

by:Murray Brown
ID: 40344643
Thanks Jim
Great answer
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question