Public Shared Function getContractStatus(ByVal ConnectString As String, _ ByRef errmsg As String) As DataSet Dim oConnection As New SqlConnection Dim oCommand As New SqlCommand Dim oDataAdaptor As New SqlDataAdapter Dim DS As New DataSet errmsg = "OK" Try oConnection.ConnectionString = ConnectString oConnection.Open() oCommand.Connection = oConnection oCommand.CommandType = CommandType.StoredProcedure oCommand.CommandText = "CMS_SRCH_GETCONTSTATUS" 'oCommand.Parameters.Add(New SqlParameter("io_cursor", SqlDbType.VarChar)).Direction = ParameterDirection.Output oDataAdaptor.SelectCommand = oCommand oDataAdaptor.Fill(DS, "ValidationValues") Catch ex As Exception errmsg = "Module: DataLayer.Common_DL.GetContractStatus, Error: " + ex.Message Finally If oConnection.State = ConnectionState.Open Then oConnection.Close() End If oCommand.Dispose() End Try Return DS End Function