Expecting: TDateField actual: TPgDateField

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
yapt
Posts: 69
Joined: Mon 16 Mar 2009 12:06

Expecting: TDateField actual: TPgDateField

Post by yapt » Sun 13 Sep 2009 20:36

PgDAC 1.20
PostgreSql 8.4.0
***********************

After upgrade to 1.20 I have this error on open/activate a PgTable that was working fine with 1.10:

TableName: Type mismatch for field 'datefield', expecting: TDateField actual: TPgDateField

Greetings.

dschuch
Posts: 75
Joined: Thu 05 Feb 2009 15:29
Location: Dresden

Post by dschuch » Sun 13 Sep 2009 22:59

sounds to me as a type change. try to recreate your fields. i think your fields are static in your dfm, delete that fields and recreate them in the fields editor.

daniel.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 14 Sep 2009 10:55

The field type is controlled via the EnablePgTimeStamps option of TPgConnection. When this option has the default value (False), standard TDateField is created.
When this option is True, TPgDateField is created. TPgDateField supports all values supported by DATE field in PostgreSQL database including B.C. dates. If you don't have dates from the distant past or future, you should use standard TDateField.

To fix the problem, set the EnablePgTimeStamps option to a value that you want. Then recreate fields in Field editor.

yapt
Posts: 69
Joined: Mon 16 Mar 2009 12:06

Post by yapt » Mon 14 Sep 2009 16:06

Solved....

Thanks a lot...

Post Reply