SQLCLR and DateTime2

前端 未结 2 1967
孤街浪徒
孤街浪徒 2021-01-05 07:30

Using SQL Server 2008, Visual Studio 2005, .net 2.0 with SP2 (has support for new SQL Server 2008 data types).

I\'m trying to write an SQLCLR function that takes a D

2条回答
  •  孤独总比滥情好
    2021-01-05 07:53

    Note that using "DateTime?" still always gives build errors (even in VS 2013 with sql 2012), though apparently the result is usable if one selects "build, deploy" and then uses the files in the obj folder, editing the generated.sql file in the sql query window (to use DateTime2 as parameter) before executing to add it to Sql Server.
    The build error is "SQL46010: Incorrect syntax near )." in \obj\Debug\YourPrjName.generated.sql

    (Would post above as comment if I could.)

提交回复
热议问题