我是 asp.net 上的新手,后面有 vb.code
我正在尝试从 sql 中获取价值
我的代码
Dim apps As New MyApps
apps.OpenConnection()
Dim esql As New SqlCommand
esql.Connection = apps.oConn
esql.CommandText = "cekdatauploads"
esql.Parameters.Add("@value", SqlDbType.Int, 2)
esql.ExecuteNonQuery()
esql.Parameters("@value").Direction = ParameterDirection.Output
Dim nilai As Integer = esql.Parameters("@value").Value
apps.CloseConnection()
错误是
The parameterized query '(@value int)cekdatauploads' expects the parameter '@value', which was not supplied.
我已经尝试执行商店程序
declare @p int
exec [cekdatauploads] @p output
print @p
并返回 0 非空值。
提前致谢!