Skip to content
Discussion options

You must be logged in to vote

The error "Add() takes exactly 0 arguments (3 given)" means you are attempting to call the Add() method on the T.FieldDef object with arguments, but the method in the Python wrapper for Delphi's FireDAC components is designed to be called without any arguments.

The correct way to create a field definition using wrapfiredac in Python4Delphi is typically to first create the TFieldDef object, set its properties, and then call the parameterless Add() to finalize it into the collection.

Here is the correct pattern, assuming T is your TFDQuery or similar FireDAC object:

1. Access the collection's new item creator

NewFieldDef = T.FieldDefs.Add()

2. Set the properties on the newly created object

N…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xtfmkh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants