Check Criteria Before Update

I have a master detail form, the header has a text box with a sales order number and a department, the detail section has a datagrid with a list of departments, when the user enters a sales order number I first need to check if it exists, if not add a new record, if it does check to see if the department exist, if it does then add a date into the detail if not add the department the date

I have got it working filtering a dataview and refilling the dataset however this is much to slow, any other suggestions will be greatly appreciated

Thanks
LVL 7
davidrichardsonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

iboutchkineCommented:
I would close the dataset before update to a differrnt one, then check Changed rows in updated dataset and do all the valaidation on the cloned dataset. After that update the table using dataadapter
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
davidrichardsonAuthor Commented:
Could you give me a bit more detail

Thanks
0
iboutchkineCommented:
What kind of details do you want
0
davidrichardsonAuthor Commented:
I have sorted, Your post pointed me in right direction
Thanks
David
0
iboutchkineCommented:
You are welcome
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.