Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.NET Question: SqlCommandBuilder dinamic sql question

Posted on 2003-12-11
3
Medium Priority
?
332 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 300 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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 …
Starting up a Project

705 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