I added to my OLEDB provider (for IB/FB) the support of DBTYPE_DBTIME2 (from MSSQL Native Client)
FB/IB supports a data type "TIME" with four digit in fraction of second. By other words: "hh:mm:ss.ffff"
So, I define Precision=13, Scale=4
When I try to work with this DBTIME2-column through linked server, MSSQL 2008 returns the error:
Msg 7356, Level 16, State 1, Line 7
OLE DB "LCPI.IBProvider.3" "IBP_TEST_FB25_v3" . "COL_TYPE_TIME" .... "LENGTH" at compile time: 5, at execute time: 4.
Ok. I change the Precision to 16 and Scale to 7 (as in SQLNCLI)
With this settings, MSSQL 2008 can to work (read/write) with my DBTIME2-column.
I tried to use new column flags [DBCOLUMNFLAGS_SS_ISVARIABLESCALE]. With (16/7) - no problem. With (13/4) - I get the same error.
Question: How to define my DBTIME2-column with required precision and scale (13/4)?
I tried to explore how SQLNCLI works with the time(4) column (precision:13, scale:4)
But did not found anything unexpected, except DBCOLUMNFLAGS_SS_ISVARIABLESCALE
View Complete Post