Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How to override Sql statement used by tableadapter to do updates

Posted on 2007-10-18
Medium Priority
Last Modified: 2008-01-09
I am having issues with dbconcurrency exceptions, and I understand that a potential fix for this is to manually construct my update sql statements, rather than using the ones generated by vb.net.

How do I go about doing this?  

I know how to create the update SQL statement for the current record in view, but it is possible to override the sql statement that will  be used when asking the tableadapter to update all the changes, as in

MyTableAdapter.Update( MyDataSet.MyTable)
Question by:hertzgordman
LVL 21

Expert Comment

ID: 20104120
Have you tried playing with MyTableAdapter.UpdateCommand before doing a MyTableAdapter.Update() ??

Accepted Solution

ceevk1 earned 2000 total points
ID: 20168490
try going on the data sources tab(for me is located next to the solution explorer tab) then right click your db and chose edit dataset with designer. that will open datase.xsd for you.if you click on the tableadapter table check the properties menu and find YpdateCommand. You can continue and set it to whatever you want from there. Everytime you call update after that it will use your command.

hope I helped :)

Author Comment

ID: 20168603
thanks will try it out...

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

578 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