我正在尝试使用 msdb.dbo.sp_update_schedule 更新 SQL Server 代理计划,但是当我尝试从代码调用存储过程时出现异常。
System.Data.OleDb.OleDbException: Error converting data type int to tinyint.
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
如何将值转换为 tinyint?
我试过了
MyParameter.DbType = System.Data.DbType.
但是没有可用的 TinyInt。
最佳答案
MyParameter.DbType = System.Data.DbType.Byte;
关于c# - 使用参数调用存储过程时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4431715/