Change field mapping

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
esasse
Posts: 47
Joined: Tue 27 Nov 2007 19:08
Location: Brazil

Change field mapping

Post by esasse » Thu 14 Apr 2011 16:19

Is it possible to change the default mapping of fields?

I want my DATE fields in Firebird to come as TSQLTimeStampField instead of TDateField.

I explain why: In MSSQL 2005, there is no DATE field, only DATETIME, and I want to make a single code compatible with both without changing my DATE fields in Firebird to DATETIME. Of course, in Firebird the time part would be discarded during convertion.

Thanks

AndreyZ

Post by AndreyZ » Fri 15 Apr 2011 12:32

Hello,

DbxIda maps DATE fields to TDateField, and TIMESTAMP fields to TSQLTimeStampField. DbxSda maps DATETIME fields to TSQLTimeStampField. DbxIda and DbxSda don't map any fields to TDateTimeField, because dbExpress supports only TSQLTimeStampField fields. You can find more detailed information about it in the Readme.html file.
To obtain the functionality you want, you should change DATE fields in your Firebird database to TIMESTAMP fields.

esasse
Posts: 47
Joined: Tue 27 Nov 2007 19:08
Location: Brazil

Post by esasse » Fri 15 Apr 2011 12:41

So there is no way to tell DbxIda to map DATE fields in Firebird to TSQLTimeStampField?

AndreyZ

Post by AndreyZ » Fri 15 Apr 2011 13:31

For the time being dbExpress driver for Interbase doesn't support such functionality.

Post Reply