I found a third party tool that will solve my problem called OmniBOM from www.omnifysoft.com
Main Topics
Browse All TopicsHello Experts. I am working on project where I am importing data from Microsoft Dynamics GP 9.0 into Excel. Then making changes to the Excel data. I want to validate a list of part numbers against the Item master in the SQL 2005 DB then import all the rows of Excel data into the Bill of Materials tables in Dynamics GP 9.0. I think the best approach is to use VB to select the column with the part numbers and run a if exsists statement against the item master table. Then throuw an error message if the part doesn't exsist. But I also need suggestions on how to import this data back into the DB with some sort of validation. I was thinking of exporting the data from Excel using an XML template to format the data and import it into the DB via a SSIS package. Your thoughts experts?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I found a third party tool that will solve my problem called OmniBOM from www.omnifysoft.com
Business Accounts
Answer for Membership
by: sebastienmPosted on 2007-06-16 at 10:02:49ID: 19298717
Hi msas1994,
Validation
I guess the list validation method would depend on how many part numbers there are in the db and how many in XL.
1) If you have not too many (ie few thousands) part numbers in the db, what about downloading them (query) to the book into a hidden sheet, then validate your list against that.
2) If 50k parts in the db, just a few items in your xl list, then you may want to check them on the db side (IF EXISTS RETURN 0 or 1)
Import
- if the xl list is small, you can use a SP with a regular Update to update 1 row at a time (Open COnnection, loop through all rows, call SP to update, Close connection)
- If you have Write privilege on the table to update, you can create a recordset, disconnect it, update it, then reconnect and UpdateBatch, so that you can cancel the entire batch if anything goes wrong. It is not a 'safe' method since you access the table directly without using an SP and it requires direct access to the table. However I have found this method faster than updating 1 row at a time.
- Now the XML method you are proposing. I have never tried it but have always tried to push people to use it at work. I like the idea of passing the entire data in 1 shot (using xml). I don't know much about SSID and all its potential, but what about exporting the data to xml then passing that entire xml string as the parameter of an SP. The SP would then break the xml down and do the update for each record.
You may want to post the Import question to the SQL Server group.
Sebastien