Time field in SQL Server and MDAC

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jmuehlenhoff
Posts: 36
Joined: Fri 30 Apr 2010 11:25

Time field in SQL Server and MDAC

Post by jmuehlenhoff » Wed 19 Mar 2014 14:38

Hi,

we would like to ship our app with zero dependencies, so we are trying to avoid installing the SQLNCLI.

That always worked well, but since we introduced "TIME" fields to our database we are running into trouble with installations that do not have the SQLNCLI installed.

It seems that the TMSQuery component is handling this kind of field as a ftWideString with MDAC as opposed to ftTime with SQLNCLI.

Is there anything we (or you) can do about this?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Time field in SQL Server and MDAC

Post by AlexP » Wed 19 Mar 2014 14:58

Hello,

This is due to the fact that MDAC doesn't support such data types as TIME (support is implemented in SQLNCLI). To work with such fields as DateTime, you can use DataTypeMapping: http://www.devart.com/sdac/docs/data_type_mapping.htm . In this case, independently on the used client, these fields will always have the same type as set in the mapping rules.

Post Reply