Solved

.NET Question: SqlCommandBuilder dinamic sql question

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
This is an explanation of a simple data model to help parse a JSON feed
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

760 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

21 Experts available now in Live!

Get 1:1 Help Now