我在 Visual Studio (VS) 中創(chuàng)建了一個存儲過程。當我在成功創(chuàng)建程序集后嘗試安裝該程序時,出現(xiàn)錯誤:sp_GetDistanceAndTime 的 CREATE PROCEDURE 失敗,因為參數(shù)“@Profile”的 T-SQL 和 CLR 類型不匹配。我如何安裝它?我的參數(shù)不正確嗎?C#代碼:public partial class StoredProcedures{ [Microsoft.SqlServer.Server.SqlProcedure] public static void SqlStoredProcedure1(SqlString Profile, SqlString StartPosition, SqlString Destination) { try { SqlPipe sqlPipe = SqlContext.Pipe; string result; result = PTVRequest.InvokeService(Profile.ToString(), StartPosition.ToString(), Destination.ToString()); SqlContext.Pipe.Send(result); } catch (Exception ex) { SqlContext.Pipe.Send(ex.Message); } }}SQL 代碼:Create Procedure sp_GetDistanceAndTime(@Profile text, @StartPosition text, @Destination text)AS External NAME GetPvt.StoredProcedures.SqlStoredProcedure1go
- 2 回答
- 0 關(guān)注
- 168 瀏覽
添加回答
舉報
0/150
提交
取消