2

我有一个使用的方法SqlHelper.ExecuteDataSet()

Private Function UpdateStatusCode(ByVal no As String, ByVal status As String) As Boolean
    sqlConn = New SqlConnection(Conn)
    Dim breturn As Boolean

    Dim param1 As SqlParameter = New SqlParameter("@No", SqlDbType.VarChar, 20)
    Dim param2 As SqlParameter = New SqlParameter("@Status", SqlDbType.Int, 4)
    Dim param3 As SqlParameter = New SqlParameter("@ErrorCode", SqlDbType.Int, 4)

    param1.Direction = ParameterDirection.Input
    param2.Direction = ParameterDirection.Input
    param3.Direction = ParameterDirection.Output
    param1.Value = no
    param2.Value = status
    Dim Table As DataTable = New DataTable()
    Dim sqlrds As DataSet
    sqlrds = SqlHelper.ExecuteDataset(sqlConn, CommandType.StoredProcedure, "sp_UpdateStatus", param1, param2, param3)
    If param3.Value.ToString() = 0 Then
        breturn = True
    Else
        breturn = False
    End If
    sqlConn.Close()
    Return breturn
End Function

如何更改 的CommandTimeOut属性SqlHelper?我已经尝试过SqlHelper.CommandTimeOut属性,但似乎 .NET 1.1 仍然不支持它。

4

0 回答 0