coderboy
coderboy

Reputation: 158

How to have blank/null for AutoInc field in FireDAC for new record instead of negative number?

By default, FireDAC uses negative numbers for AutoInc field for new records not yet posted to the database. How do you get the AutoInc field to be null and therefore show blank on a dbgrid?

Thanks.

Upvotes: 0

Views: 852

Answers (1)

AnselmoMS
AnselmoMS

Reputation: 467

Another solution is setting the field's property DefaultExpression = Null and it work.Works for me.

Source: http://codeverge.com/embarcadero.delphi.firedac/integerfield-default-value-1/2001860

Upvotes: 2

Related Questions