我正在使用这个功能:
Private Sub Trigger_sales(HIden As Guid)
Dim connection As New SqlConnection(connectionString)
connection.Open()
Dim Command As New SqlCommand()
Command.Connection = connection
Command.CommandType = CommandType.StoredProcedure
Command.CommandText = "[WebSite].[ValidateWebTran]"
Command.Parameters.Add("@UidWenTranGUID", SqlDbType.UniqueIdentifier)
Command.Parameters("@UidWenTranGUID").Value = HIden
Command.Parameters.Add("@sResultDesc", SqlDbType.VarChar)
Command.Parameters("@sResultDesc").Direction = ParameterDirection.Output
Command.ExecuteScalar()
If (String.IsNullOrEmpty(error_process.text = Command.Parameters("@sResultDesc").Value.ToString)) Then
complete_sales(HIden)
End If
End Sub
导致此错误:
String[1]:Size 属性的大小为 0 无效。
谁能看到我做错了什么?