[Lazarus] SQLdb not detect automatically Required field

Michael Van Canneyt michael at freepascal.org
Wed Aug 10 00:21:43 CEST 2011



On Tue, 9 Aug 2011, silvioprog wrote:

> Hi,
>
> Someone is experiencing this problem?:
>
> http://62.166.198.202/view.php?id=19872
>
> I'm trying to create an OPF, but with this bug still isn't possible to
> continue implementing my framework.

It is not always possible to detect the required field.
Delphi also very often does it wrong.  (for instance when you do a join)

That is why sql-db relies on the ProviderOptions property : 
pfInkey should be set for the keyfield.

This does not exclude that fcl-db should try harder to detect the 
key field, but you should be aware that it cannot always be detected 
reliably. (I always specify it manually)

So leave the bug open. But try setting the pfInKey option
whenever you can.


Michael.




More information about the Lazarus mailing list