Board index » delphi » SQL Date Type Prolems (Interbase Paradox MSSQL)

SQL Date Type Prolems (Interbase Paradox MSSQL)

A problem arises when having added fields (type fkData) in the FieIdsEditor
for a SQL component and the field type is 'Date' and the database is
switched from PARADOX to either INTERBASE or MSSQL, which then generates an
error 'Type mismatch in field ????? actual Date actual DateTime' is raised.

Is there any workaround for this problem.

I could change all the date fields in the Paradox tables to Timestamp, but
what are the implications of this action?

It seems to me that the ability to switch database types for an application
has been emasculated by this problem.

 

Re:SQL Date Type Prolems (Interbase Paradox MSSQL)


On Thu, 29 Apr 1999 10:19:12 +1000, "Rob Price" <r...@acslink.net.au>
wrote:

Quote
>A problem arises when having added fields (type fkData) in the FieIdsEditor
>for a SQL component and the field type is 'Date' and the database is
>switched from PARADOX to either INTERBASE or MSSQL, which then generates an
>error 'Type mismatch in field ????? actual Date actual DateTime' is raised.

>Is there any workaround for this problem.

>I could change all the date fields in the Paradox tables to Timestamp, but
>what are the implications of this action?

>It seems to me that the ability to switch database types for an application
>has been emasculated by this problem.

I don't know about MSSQL, but InterBase and other engines do not
provide 'date-only' fields.  InterBase fields must be used with a
TDateTimeField object because there *could* be a time value specified.
I think there is no solution other than using Paradox Timestamp fields
(which should also map to TDateTimeField) or creating the TField
object programmatically, taking into account the type of db the app is
actually using.

Regards,

--
Marco Rocci
MicroEra srl
Turin, Italy
-----------------
vota contro lo SPAM su: http://www.politik-digital.de/spam/

Re:SQL Date Type Prolems (Interbase Paradox MSSQL)


There is no Date or Time field type in MSSQL server, only DateTime.

tomi.

Quote
Rob Price wrote in message <7g88cj$md...@forums.borland.com>...
>A problem arises when having added fields (type fkData) in the FieIdsEditor
>for a SQL component and the field type is 'Date' and the database is
>switched from PARADOX to either INTERBASE or MSSQL, which then generates an
>error 'Type mismatch in field ????? actual Date actual DateTime' is raised.

>Is there any workaround for this problem.

>I could change all the date fields in the Paradox tables to Timestamp, but
>what are the implications of this action?

>It seems to me that the ability to switch database types for an application
>has been emasculated by this problem.

Other Threads