ADO.NET - The Size property has an invalid size of 0

前端 未结 10 1054
小蘑菇
小蘑菇 2020-12-14 13:41

I\'m trying to get output value from DB via ADO.NET. There\'s a client code:

    using (var connection = new SqlConnection(ConnectionString))
    {
                


        
10条回答
  •  长情又很酷
    2020-12-14 14:21

    Also, you can get the actual size of the parameters by inspecting the sproc with this little command:

    SqlCommandBuilder.DeriveParameters(yourCommand)
    

    and then just foreach your way through the parameters collection.

提交回复
热议问题