我正在使用Visual Stu@R_502_410@ 2013创建一个新的sql CLR,并且在Project Properties中将Default Schema设置为’decASM'(是’dbo’).当我进行此更改并重建项目VS时,生成一个sql文件,如下所示:
-------------------------------------------------------------------------------- -- This code was generated by a tool. -- -- Changes to this file may cause incorrect behavior and will be lost if -- the code is regenerated. -------------------------------------------------------------------------------- CREATE FUNCTION [decASM].[ExecFoxPro_SayHello] (@name [nvarchar](MAX)) RETURNS [nvarchar](MAX) AS EXTERNAL NAME [dcFoxProAssy].[UserDefinedFunctions].[ExecFoxPro_SayHello]; GO CREATE FUNCTION [decASM].[GetAllowedPaths] (@serviceUrl [nvarchar](MAX)) RETURNS [nvarchar](MAX) AS EXTERNAL NAME [dcFoxProAssy].[UserDefinedFunctions].[GetAllowedPaths]; GO CREATE FUNCTION [decASM].[GetTableRowCount] (@serviceUrl [nvarchar](MAX),@foxProPath [nvarchar](MAX),@tableName [nvarchar](MAX)) RETURNS [nvarchar](MAX) AS EXTERNAL NAME [dcFoxProAssy].[UserDefinedFunctions].[GetTableRowCount]; GO
Error 1 sql71501: Function: [decASM].[ExecFoxPro_SayHello] has an unresolved reference to Schema [decASM]. Error 2 sql71501: Function: [decASM].[GetAllowedPaths] has an unresolved reference to Schema [decASM]. Error 3 sql71501: Function: [decASM].[GetTableRowCount] has an unresolved reference to Schema [decASM].
如果我将默认架构更改回’dbo’,则项目将成功构建.我搜索了项目属性和Google,但找不到如何添加对’decASM’的引用.