Avatar of ziche
ziche

asked on 

'Invalid value for field' Error

I have a form that access a table through a TADOQuery control which has its contents edited through a Data Grid.

It was working fine until I added a calculated field to the TADOQuery and inserted code in its OnCalcFields event like this...

with ADOQUERYTABLEX do begin

      ADOQUERYTABLEXnewfield.Value
      :=  FieldByName('FIELDY').Value * FieldByName('FIELDZ').Value ;

end;

Now whenever I try to assign any values to the table's other fields, the following exception is raised.

"Invalid value for field 'FIELDX' "

Whats going on?
Delphi

Avatar of undefined
Last Comment
kretzschmar
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Delphi
Delphi

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

60K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo