Hi all,
Working on the SQLDB Tutorial1 on the wiki.
I'm struggling with getting dbgrid-driven inserts to work. Using Firebird employee.fdb CUSTOMER table; CUST_NO is an integer primary key with Firebird generator/sequence + trigger => sort of an autonumber/autoinc field.
When inserting records with an empty CUST_NO, I get an error that CUST_NO is required.
Somebody on a Dutch forum told me to try to predefine SQLQuery field definitions, and set faRequired to false for CUST_NO. While that didn't seem to work for me, I thought "why not programmatically set that property after loading the query" and found http://freepascal.org/docs-html/fcl/db/tfield.attributeset.html
However, it doesn't say exactly what AttributeSet is meant for, and more importantly, what values to set.
A grep through the FPC source code didn't help either.
So my questions:
1. What does Attributeset mean
2. What strings can I feed it with
3. Would that help in my case (of course, this is the FPC list, so any answer to this Lazarus-related question would be a bonus ;)
Sample source code with Windows embedded Firebird dlls, database can be downloaded from
https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/laztut_nlDelphi_embedded4sept.zip
Thanks,
Reinier
