Inserting and updating to a field named "NEW_CODE"

We have a table with the fields "CODE" and "NEW_CODE"

We have a TFDQuery with a TFDUpdateSQL tied to it, and the sql is defined.  If we do a .Insert or .Update, both CODE and NEW_CODE are being set to the value we are storing in CODE.

I understand that the NEW_ and OLD_ prefixes work in triggers, but how can I turn off FD's preprocessing so this will work as it did in BDE?

I would prefer to not have to rename the column.

Thanks,

Bryan
0
Bryan
8/7/2015 8:10:39 PM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

1 Replies
603 Views

Similar Articles

[PageSpeed] 7

So, you should use:
* :NEW_CODE, :OLD_CODE parameter names for "CODE"
* :NEW_NEW_CODE, :OLD_NEW_CODE for "NEW_CODE"

More about that:
http://docwiki.embarcadero.com/RADStudio/XE8/en/Overriding_Posting_Updates_%28FireDAC%29#Settings_at_Run_Time

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
0
Dmitry
8/9/2015 4:17:19 PM
Reply:

Similar Artilces:

Mail resending duplicates in the "from" field the (Given Name Last Name) if name contains a "-"
Hello, An other incredible behavior with client GW8.01 and GW8.01HP if you resend one of your mail and if you given name or last name contains a "-" in eDir, the from field of your email is populated with a second occurrence of (givenname lastname); if you resend this again, then you get it 2 times (givenname lastname)(givenname lastname)etc... so an example: Suppose you are Snow White, with a frenchy touch, eDir Given Name: Blanche-Neige eDir Last Name: Disney and your GW address book is updated with it in first name/last name/name according eDir, Then if...

Should "update code lines" and "insert code lines" be same page.aspx or be different (update.aspx and insert.aspx)??
hi friends Should "update code lines" and "insert code lines" be same page.aspx or be different (update.aspx and insert.aspx)? if i use same page.aspx for this, code lines be 1000 lines in page.aspx.vb but one page connect to masterpage... if i use different *.aspx for this, code line be 500 lines in per *.aspx.vb  for per *.aspx... but two pages connect to masterpage.. So i have almost 60 pages (*.aspx).. if i select different *.aspx for update and insert, my pages will be 120 pages (*.aspx) which one should i select ? which one runs high performance ? co...

"Before Update" and "After Update Of" triggers
Hi all, In a row-level before update trigger I set the value of a column ("SomeColumn) to some value (the value is only changed by this trigger, not by the update statement itself) Now I notice that the row-level trigger defined as "after update of SomeColumn" doesn't fire when I change the value of this column in the before update trigger. It does fire (as expected) when the change comes from the update statement itself) Questions: - Is this expected behaviour? - how can I uniformly trigger a change of a column wether set by the update statement or by...

Bookmarks Edit Dialog: "Tags Field" First Active Edit Field, *Not* the "Name Picker" Field. Can't be Changed in about:config
Name: Jimi Doe Product: Namoroka Summary: Bookmarks Edit Dialog: "Tags Field" First Active Edit Field, *Not* the "Name Picker" Field. Can't be Changed in about:config Comments: Problem --- When I want to bookmark a web page the tag field is always the first active field in the bookmark edit dialog, not the name field as it should be according to the standard behavior. If I change this via "about:config" my configuration lasts only for one bookmark. As of the second site I bookmark the configuration is reverted to "browser.bookmarks.editD...

column "name" is not in table "name "
I have a problem with PB 6.5.1, and Informix 5.02 (Online) ... We receive the error above in subject.... when i tried to make a Datawindow updated. (settings) .. I`m not sute what that mean.. I have done all the testing.. and I did not find anything...Please .. help me Carlos BDT-Caracas-Venezuela Carlos, It sounds like the datawindow has a select statement that selects data from multiple tables using a SQL Join. nd perhaps when the update properties were set, columns from multiple tables were selected and marked as updateable columns. I will test this when I get a ...

wish DetailsView have "update()" & "Insert()" method
wish DetailsView have "update()" & "Insert()" method. So we can fire the "update" & "insert" from outside of the DetailsView Control. It is very useful when use two of more DetailsView controls in one page, and wish only click one button to update or Insert these DetailsView Controls at same time. I think if you don't want to go through the data source, you can use DetailsView's RaisePostBackEvent method to fire the "update" & "insert" events from the outside of the DetailsView control. DetailsView's this method is...

AD driver does not update "name" or "CN" attributes
I have an AD driver that's been running for a little over a year, it's version is 3.5.8 and is running on IDM 3.6.1. My client wishes to change their naming scheme and so I have written a loopback driver that renames user object with the new scheme. Most things work fine, the sAMAccountName and userPrincipalName attributes change appropriately. However, the "name" attribute, which I am guessing is the attribute that is displayed in the AD Users and Computers interface on the AD server, is not changing nor the "CN" attribute. When I perform the rename fr...

No "Update" or "Delete"!
Hi,I am using the dataset wizard to connect to a SQL database. The wizard creates my dataset and generates  "Select" and "Insert" statements but no "Update" or "delete". What can be the reason? By the way, this happens only on certain tables and not on others. I just can't figure out what the difference between these tables is. And, they all have a primary key. Actually I found this error before, running the configuration for the table again gives me that, sometimes I had to delete the table and start again. Hope this helps, let me...

ASP server attempt. Is it possible to implement, Session("name")="Damian"; Application("name")="test"
I'm looking at modifing our www server embedded in our product with some ASP similar features. Will have 1 JS runtime, and a pool of JS contexts First I thought 'Session' could be a property of the global object, but then you can't pass a arguement to a property. I was planning keeping the data in C++, when the user requested it, convert/copy it to a jsval. Now I'm thinking Session is more like a global JS array. But then its entire contents will be stored against the global object. Which is ok, I don't need to know the infor from C++. Which means I would nee...

META name="title" + META name="description" + META name="keywords" in MasterPage head section
Hy Guys, I've placed these META tags on the HEAD section of my MASTERPAGE of my application (used in all my webforms) Last Monday week I was on the first page of GOOGLE at the sixth position. Last Friday, I've added a script section on my head too. Something like: function .... .... .... This week, I can't even find my site even if I put on the search engine te exact site name. Did I do something wrong? Does the scrip section stop the google robots to read the META tags? Thank you in advance MarcoMarco First of all, META tags...

Changing the "from-name" / "friendly-name" / sender
Hi, I'm not sure what's the correct designation for the object I'm talking about. In my german GroupWise it's the "Von-Name" or in some cases it's called "friendly name". I'm talking about the sender of an E-Mail which is shown in my GroupWise Mailbox, such as "Peter Briggs <p.briggs@mailman.com>"... My question is who to change it to "Peter Briggs, Mailman Inc. <p.briggs@mailman.com>" ... (adding the ", Mailman Inc.") While using GroupWise in the Caching Modus I can change it on my own in ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

SQL: Column names, can ONLY get "name" instead of "table.name"
Hey all, When iterating through column names returned from a query, I need to get "table.name" rather than just "name" Check it out: If I have an SQL statement "SELECT table1.ID, table2.ID FROM table1, table2;" And table1 has a column name 'ID' and table2 has a column name 'ID' aswell, and i run the query, the dataset will contain column names 'ID' and 'ID' instead of 'table1.ID' and 'table2.ID' It is extremely important that I can differenciate between the 2 fields, and know where each of them come from. The same thing happen...

Web resources about - Inserting and updating to a field named "NEW_CODE" - embarcadero.delphi.firedac

Resources last updated: 12/29/2015 3:25:14 PM