GetByKey(Int32,String) Method
- Last UpdatedNov 06, 2025
- 1 minute read
The GetByKey() method retrieves the specified sample attribute record from the Sample_Attr table.
This overload of the method uses the attribute description to identify the attribute.
'Declaration
Public Overloads Shared Function GetByKey( _
ByVal sampleId As Integer, _
ByVal attrDescription As String _
) As DataSet
'Usage
Dim sampleId As Integer
Dim attrDescription As String
Dim value As DataSet
value = SampleAttr.GetByKey(sampleId, attrDescription)
public static DataSet GetByKey(
int sampleId,
string attrDescription
)
Parameters
- sampleId
- Required. Holds the sample ID.
- attrDescription
- Required. Holds the description of attribute retrieved.
Return Value
Returns a DataSet that contains the record from the Sample_Attr table that satisfies the specified filters. If no matching record is found, an empty DataSet is returned.