Page 1 of 1
Where clause of update and delete commands in dataset
Posted: Mon 26 Jan 2009 09:44
by matthieu de graaf
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
Posted: Mon 26 Jan 2009 13:03
by Shalex
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?
Posted: Wed 28 Jan 2009 08:40
by matthieu de graaf
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
Posted: Wed 28 Jan 2009 10:13
by Shalex
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.
Re: Where clause of update and delete commands in dataset
Posted: Thu 26 Jul 2012 06:19
by teo_n
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
Re: Where clause of update and delete commands in dataset
Posted: Fri 27 Jul 2012 10:07
by Shalex
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.