Where clause of update and delete commands in dataset

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
matthieu de graaf
Posts: 18
Joined: Wed 14 May 2008 12:13

Where clause of update and delete commands in dataset

Post by matthieu de graaf » Mon 26 Jan 2009 09:44

Hi,

I'm creating datasets with dotConnect for Oracle with the dataset wizard. The dataset wizard generates update and delete commands with a where clause where all database columns are compared with all the original values. In 99% of the cases you don't change your primary key and a where clause like "pk_column= :original_pk_column" would do.

It would be nice to have a checkbox in the dataset wizard, which determines whether the where clauses of the update and delete commands are generated on the basis of the pk of the table

Regards,

Matthieu de Graaf

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 26 Jan 2009 13:03

When you have chosen the tables in DataSet Wizard, the next step is Setting up individual data tables. There is the Configure commands button in this window. Please click it, and you will be able to regenerate commands in the Command Generator tab.
For more information, please refer to http://www.devart.com/dotconnect/oracle/docs/ , the Database Application Development Concepts part, the Using DataSet Wizard section.

Is that what you mean?

matthieu de graaf
Posts: 18
Joined: Wed 14 May 2008 12:13

Post by matthieu de graaf » Wed 28 Jan 2009 08:40

Hi Shalex,

I'm well aware of this option. My problem is that the proposed defaults are not very handy and it's quite cumbersome to modify the where clauses.
I tend to use the wizard multiple times for instance when I want to add a column to my dataset. Now I have to change the commands every time I use the wizard.
The proposed checkboxes (use schema name, derive where clause from primary key) would be very handy.

Regards,

Matthieu de Graaf

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 28 Jan 2009 10:13

We will investigate the possibility of adding these options (no schema name, no where clause) and notify you about the results as soon as possible.

teo_n
Posts: 1
Joined: Thu 26 Jul 2012 06:09

Re: Where clause of update and delete commands in dataset

Post by teo_n » Thu 26 Jul 2012 06:19

We are using the version 5.25.49.0 and we also have this problem.
I just wondered if this problem is solved in the newer versions.
It might be a reason for us to upgrade.

Regards,

Teo_n

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Where clause of update and delete commands in dataset

Post by Shalex » Fri 27 Jul 2012 10:07

teo_n wrote:I just wondered if this problem is solved in the newer versions.
Yes, the corresponding options are available in the latest (7.1.40) version of dotConnect for Oracle: Tools > Oracle > DataSet Wizard > go through the wizard to the "Setup individual data tables" step > press the "Configure commands" button > open the "Command Generator" tab > clear the "Use schema name" checkbox (!) > press the "Get Table Fields" button > the WHERE clause (!) depends on the selected Key fields (modify their set if needed), press the "Generate Commands" button and make sure that the update command reflects settings from the "Command Generator" tab.

You can check this funtionality with the trial version: http://www.devart.com/dotconnect/oracle/download.html.

Post Reply