Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 611057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:44:33+00:00 2026-05-13T17:44:33+00:00

I need update a field value , increasing the old value. something like ths

  • 0

I need update a field value , increasing the old value. something like ths

UPDATE MYTABLE SET FIELD1=FIELD1+VALUE WHERE ....

but when run the next code i have this error

Parameter object is improperly
defined. Inconsistent or incomplete
information was provided

this is my code

AdoQuery:=TADOQuery.Create(nil);
    try
        AdoQuery.Connection:=FAdoConnection;
        AdoQuery.Active:=False;
        AdoQuery.Parameters.CreateParameter('RECON',ftFloat,pdInput,SizeOf(Double),d1);
        AdoQuery.Parameters.CreateParameter('NUM',ftInteger,pdInput,SizeOf(Integer),Trans);
        AdoQuery.Parameters.CreateParameter('LIN'   ,ftInteger,pdInput,SizeOf(Integer),Lin);
        AdoQuery.SQL.Clear;
        AdoQuery.SQL.Add('UPDATE DIPTT SET VALRECON=:RECON+VALRECON WHERE NUM=:NUM AND LIN=:LIN');
        AdoQuery.Prepared:=True;
        AdoQuery.ExecSQL;
    finally
        if AdoQuery.Active then AdoQuery.Close;
        AdoQuery.Free;
    end;

i tried multiples combinations

1)

    AdoQuery.SQL.Add('UPDATE DIPTT SET VALRECON=VALRECON+:RECON WHERE NUM=:NUM AND LIN=:LIN');

2)

        AdoQuery.SQL.Add('UPDATE DIPTT SET VALRECON=(VALRECON)+:RECON WHERE NUM=:NUM AND LIN=:LIN');

Only when i tried this it works. (obviously this is not a valid option, but show me where the problem is)

        AdoQuery.SQL.Add('UPDATE DIPTT SET VALRECON=:RECON WHERE NUM=:NUM AND LIN=:LIN');

How can rewrite this sentece?

Any clues?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:44:33+00:00Added an answer on May 13, 2026 at 5:44 pm

    Quick guess (nothingto hand right now to play with this) but try putting the parameter in brackets thus;

    UPDATE DIPTT SET VALRECON=(:RECON)+(VALRECON) WHERE NUM=:NUM etc
    

    Failing that, your best route might be to construct the SQL statement dynamically for that part eg

    FSQL:='UPDATE DIPTT SET VALRECON=VALRECON+' + IntToStr(d1) + 
          ' WHERE NUM=:NUM etc';
    AdoQuery.SQL.Text:=FSQL;
    

    then set your Num parameter values (etc) as before

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a need to update one field to the same value in a
I need to update same field to same value for hundreds of workitems in
I need to update a field (called updated_at ). The field in MySQL is
I have table 'products' and I need to update 'price' field by 20% if
I need to update the Notes field in my table tblMain by concatenating the
I need to update an existing SharePoint content type by adding a new field
I've got the entity that contains @version field. Sometimes I need to update it
I need to keep a field in a data-base and update it with a
I need to update the GroupID field to a 0. I have figured out
I need a SQL update statement for updating a particular field of all the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.