ComAs::GetFieldID (Interface: ComAs)
 
Gets the field identifier.
 
enum eComAsFld GetFieldID (
    BSTR bsFieldName
)
 
Parameters
bsFieldName
[in] A string containing the name of the field of which you want to know the identifier.
 
Return value
Identifier of the field, e.g. casfSysNum (C++) or eComAsFld.casfSysNum (C# / VB.NET).
 
Remarks
If an identifier is given for a field that does not exist, this method will return -1.
 
See Also
CreateComAs
GetFieldName
 
Samples
 
C++
 
// Retrieve the identifier of the 'system number'-field.
eComAsFld eFieldId = pComAs->GetFieldID ("SysNum");

C#
 
// Retrieve the identifier of the 'system number'-field.
eComAsFld eFieldId = oComAs.GetFieldID ("SysNum");

VBS
 
' Retrieve the identifier of the 'system number'-field.
Dim eFieldId
eFieldId = oComAs.GetFieldID("SysNum")

VB.NET
 
' Retrieve the identifier of the 'system number'-field.
Dim eFieldId As eComAsFld
eFieldId = oComAs.GetFieldID("SysNum")