Solved

.NET Question: SqlCommandBuilder dinamic sql question

Posted on 2003-12-11
3
309 Views
Last Modified: 2010-04-17
Hi

1. I have a view i sql2k db with 2 databases in it & instead of update trigger - they work 100%
2. I use data adapter to generate dynamic sql update command (in need it to be dynamic).
3. When i update my data adapter (after RefreshSchema() in sqlcommandbuilder with data adapter) i recieve the following error :
"dynamic sql generation is not supported against multiple base tables"

How can i override command builder so that he will generate the command text (sql statement) but will not try to check if the view is with more that one table ?
0
Comment
Question by:lantzman
3 Comments
 
LVL 4

Accepted Solution

by:
krznpsk earned 150 total points
ID: 9921653
lantzman:

The problem here is that you cannot perform an UPDATE command on two tables at once.  I would propose two solutions:

1. Write custom code to update your tables, one at a time, or
2. Create a view in the database to look like one table, and implement triggers to order exactly how you want an update to go.
0
 

Author Comment

by:lantzman
ID: 9936772
This solution is an obious one, i've asked if thers a possibility to somehow oweride the data adater which throws exception on my try to update using the da.Update() without witting custom update code....(i've implemented instead of triggers)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.

840 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