PC Review


Reply
Thread Tools Rate Thread

Configure Data Adapter problem

 
 
=?Utf-8?B?Y3dicDE3?=
Guest
Posts: n/a
 
      5th Aug 2005
I receive the following message after

'Generated INSERT statement'
'Generated UPDATE statement'
'Generated DELETE statement'

"The original query has a select list that has columns from multiple tables.
The statement cannot be generated automatically for this type of query."

Here's my Oracle databse query:

select car_master.car_id,
car_master.year,car_master.vehicle,car_detail.car_id AS EXPR1,
car_detail.price,car_detail.mileage,car_detail.body,car_detail.body FROM
car_master,car_detail where car_master.car_id=car_detail.car_id;

Any suggestions would be appreciated.

Thanks.

bebop
 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      5th Aug 2005
Your FROM has more then one table in it. The command builder (and the wizard
in VS.NET) does not support that because in theory you could be selecting
column from different tables, and updating them. Then it has to update all
the rows from different table, and it has no way of figuring out which row
because of the joins.

If you want to use a command builder at run time, you can change the SELECT
statement on the adapter prior to creating the command builder to be just
from the table you want to update to, and only include the columns that
belong to that table. That should work ok.

If you are using the wizard, then my suggestion would be to never ever use
it.

"cwbp17" <(E-Mail Removed)> wrote in message
news:020565BA-2934-4542-9413-(E-Mail Removed)...
>I receive the following message after
>
> 'Generated INSERT statement'
> 'Generated UPDATE statement'
> 'Generated DELETE statement'
>
> "The original query has a select list that has columns from multiple
> tables.
> The statement cannot be generated automatically for this type of query."
>
> Here's my Oracle databse query:
>
> select car_master.car_id,
> car_master.year,car_master.vehicle,car_detail.car_id AS EXPR1,
> car_detail.price,car_detail.mileage,car_detail.body,car_detail.body FROM
> car_master,car_detail where car_master.car_id=car_detail.car_id;
>
> Any suggestions would be appreciated.
>
> Thanks.
>
> bebop



 
Reply With Quote
 
W.G. Ryan MVP
Guest
Posts: n/a
 
      5th Aug 2005
Like Marina mentions, none of the tools that autogenerate CRUD logic can
generate all 4 commands if you use a JOIN. Your best bet is to fire
multiple queries and use then use a DataRelation between the tables in a
dataset to maintain integrity.
"cwbp17" <(E-Mail Removed)> wrote in message
news:020565BA-2934-4542-9413-(E-Mail Removed)...
>I receive the following message after
>
> 'Generated INSERT statement'
> 'Generated UPDATE statement'
> 'Generated DELETE statement'
>
> "The original query has a select list that has columns from multiple
> tables.
> The statement cannot be generated automatically for this type of query."
>
> Here's my Oracle databse query:
>
> select car_master.car_id,
> car_master.year,car_master.vehicle,car_detail.car_id AS EXPR1,
> car_detail.price,car_detail.mileage,car_detail.body,car_detail.body FROM
> car_master,car_detail where car_master.car_id=car_detail.car_id;
>
> Any suggestions would be appreciated.
>
> Thanks.
>
> bebop



 
Reply With Quote
 
=?Utf-8?B?Y3dicDE3?=
Guest
Posts: n/a
 
      8th Aug 2005
Thanks for the responses.

I'll keep the queries separate.

bebop


"W.G. Ryan MVP" wrote:

> Like Marina mentions, none of the tools that autogenerate CRUD logic can
> generate all 4 commands if you use a JOIN. Your best bet is to fire
> multiple queries and use then use a DataRelation between the tables in a
> dataset to maintain integrity.
> "cwbp17" <(E-Mail Removed)> wrote in message
> news:020565BA-2934-4542-9413-(E-Mail Removed)...
> >I receive the following message after
> >
> > 'Generated INSERT statement'
> > 'Generated UPDATE statement'
> > 'Generated DELETE statement'
> >
> > "The original query has a select list that has columns from multiple
> > tables.
> > The statement cannot be generated automatically for this type of query."
> >
> > Here's my Oracle databse query:
> >
> > select car_master.car_id,
> > car_master.year,car_master.vehicle,car_detail.car_id AS EXPR1,
> > car_detail.price,car_detail.mileage,car_detail.body,car_detail.body FROM
> > car_master,car_detail where car_master.car_id=car_detail.car_id;
> >
> > Any suggestions would be appreciated.
> >
> > Thanks.
> >
> > bebop

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Strongly Typed Dataset - without "Configure Data Adapter" itinsley@gmail.com Microsoft ADO .NET 3 13th Jan 2006 01:09 AM
Can't configure data adapter =?Utf-8?B?SmFja08=?= Microsoft ASP .NET 1 27th Jun 2005 08:23 PM
cannot configure data adapter through wizard monika Microsoft ASP .NET 0 24th Jun 2005 10:57 AM
Configure Data Adapter Wizard Failing Jeff Dillon Microsoft ADO .NET 1 4th Nov 2004 08:37 PM
re configure data adapter (9999) not =?Utf-8?B?c2ltb24=?= Microsoft ASP .NET 0 23rd Jan 2004 05:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:41 AM.