Solved

.NET Question: SqlCommandBuilder dinamic sql question

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

919 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now