Solved

.NET Question: SqlCommandBuilder dinamic sql question

Posted on 2003-12-11
3
316 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
[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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
A short article about problems I had with the new location API and permissions in Marshmallow
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

740 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