C# SQL Server 2005程序集强制转换无效
我试图调用我的assemblys SP并收到以下错误:C# SQL Server 2005程序集强制转换无效,c#,sql-server,sql-server-2005,assemblies,types,C#,Sql Server,Sql Server 2005,Assemblies,Types,我试图调用我的assemblys SP并收到以下错误: A .NET Framework error occurred during execution of user-defined routine or aggregate "Pmt_ImportJournal": System.InvalidCastException: Specified cast is not valid. System.InvalidCastException: at JournalImport.Pmt_Im
A .NET Framework error occurred during execution of user-defined routine or aggregate "Pmt_ImportJournal":
System.InvalidCastException: Specified cast is not valid.
System.InvalidCastException:
at JournalImport.Pmt_ImportJournal(Int32 orderno)
程序集中我的SP的定义如下:
[SqlProcedure(Name = "Pmt_ImportJournal")]
public static void Pmt_ImportJournal(int orderno)
我应该在签名中使用SQL*数据类型而不是简单的int吗?例如SqlInt32?您是否尝试查看所创建的存储过程的签名?此外,您的方法是否有可能在更深处出现强制转换错误?检查Pmt\u ImportJournal方法内部。其中的某些代码行可能会引发异常