Page 1 of 1

Time field in SQL Server and MDAC

Posted: Wed 19 Mar 2014 14:38
by jmuehlenhoff
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?

Re: Time field in SQL Server and MDAC

Posted: Wed 19 Mar 2014 14:58
by AlexP
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.