RE: Update on Your Request {40293}

  • updated
  • Completed
Hi Sergey,

I spend quite a lot of time on databases that I haven't written or designed,
these often have errors within them when FireDAC looks at them. I have in
the past exported the data to a new file and corrected the errors, or I have
written a quick application to truncate the data, however as the data is
usually unimportant, I just want to create the query, then to ignore field
length errors would not be a problem to me.

Ideal would be to have an option to "Truncate field length errors" . or to
have a hidden switch in the INI File if you think that this would be a
problem to others ?

Best Regards


From: ActiveDBSoft Support Team []
Sent: 08 December 2015 04:44
Subject: RE: Update on Your Request {40293}

Request Update

View the complete request history

Hello, Steve.

We investigated this problem.

The StrsTrim2Len property determines the way FireDAC acts on assigning a
longer value that the field can accept. When this property is on, FireDac
trims the assigned value and doesn't generate any errors, otherwise it
generates the error. But FireDac raises this error anyway on trying to open
inconsistent table, regardless of the StrsTrim2Len property value.

The only way that we've found to open such table is to make mapping of
string type to memo. This way the table opens fine, but the software can't
control maximum length for string fields. so you should use it at your own
risk. Would you like to have such an option?

Sergey Smagin
Product Manager
Active Database Software

mailto: <>

The 'StrsTrim2Len' option determines whether to raise an error or to truncate a value if a value is assigned programmatically to a string field (dataset.FieldByName('stringfield').AsString := 'very long string';). But for the end-user it is impossible to assign a longer value then the field accepts, because data controls (the data grid or an edit box in the form view) don't allow to type more characters than accepted.

As far as I understand, you aren't getting this error on trying to post data to a table, but on opening it. This property will not prevent raising of such error in case of opening an inconsistent table, so it will be completely useless.

What we can do is to make an option to ignore inconsistent data by casting all string fields to memos. So, the question is: do you need such an option?


Casting them to Memos would work, however the representation of the data would be incorrect.

If I take the same SQLLite database and use FireDAC in Delphi to connect to it, and then simply try to see the data within a table then it produces the overflow error, if I turn on the option in the FireDAC connection editor then I can open the table ( obviously the field is truncated but this is not a problem) and I can create and test the SQL Statements I am looking for.

I understand that the field should not accept data longer and therefore the could be a problem within FireDAC interpreting the data incorrectly, however I was purely looking for a simple workaround to be able to work with the tables.

I have attached the database I am setting up queries for, if you open in ( SQLLITE , no password ) .. and then try and browse data in the configuration table ( and others ) then you will see the notification, if within FireDAC you turn on the truncation then you can access and browse the data.

Hope this helps :)


From: ActiveDBSoft Support Center []
Sent: 08 December 2015 09:34
Subject: [ActiveDBSoft / Active Query Builder Support Center] RE: Update on Your Request {40293}

Thank you for the sample DB. We successfully reproduced this problem and will turn off this property in the next minor version.

thanks for your excellent support and a fantastic program ..


Sent from my Mobile Device

> On 9 Dec 2015, at 05:03, ActiveDBSoft Support Center <> wrote:

Please try the new version The 'StrsTrim2Len' option is set by default.