Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: "Field 'Amount' not found." Error


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jul 21, 2017 8:29 AM Last Post By: Earl Staley
Earl Staley

Posts: 99
Registered: 4/9/07
"Field 'Amount' not found." Error  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 17, 2017 8:54 PM
I have these FieldDefs:
	         Creditors[index].Table->FieldDefs->Add("DateStr", ftString, 25, true);
		 Creditors[index].Table->FieldDefs->Add("Amount", ftInteger, 0, true);
		 Creditors[index].Table->FieldDefs->Add("ConfirmationNo", ftString,
		 40, false);
		 Creditors[index].Table->FieldDefs->Add("CheckNo", ftInteger, 0, false);
		 Creditors[index].Table->FieldDefs->Add("Notes", ftString, 255, false);

I get the following error on this line:
if (!VarIsNull(Creditors[index].Table->FieldByName("Amount")->Value))


"Field 'Amount' not found."

Since the FieldDef above has an "Amount" field, why am I getting this error?

Thank you for your help...
Earl Staley

Edited by: Earl Staley on Jul 21, 2017 8:24 AM

Earl Staley

Posts: 99
Registered: 4/9/07
Re: Error Dynamically Creating FireDAC TFDTables  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 18, 2017 10:39 AM   in response to: Earl Staley in response to: Earl Staley
Deleted

Edited by: Earl Staley on Jul 21, 2017 8:28 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02