Select to view content in your preferred language

Issue in GetString()

1194
1
06-06-2024 01:24 AM
PeterRollier
New Contributor

Hi,

I'm getting a General Function Failure when I try to use GetString in a row.
I can get the field information and type without a problem.
on an integer field I can get the value.

Dim myId As Integer = r.GetInteger("OIDN")
Dim myValue As String = r.GetString("WAARDE")

In the above code the .GetString is nog working, can someone help me what I'm doing wrong?

thanks

0 Kudos
1 Reply
GKmieliauskas
Esri Regular Contributor

I realize this is late help, but maybe it will help others. You need to check IsNull first on desired field:

            if (!row.IsNull(fieldName))
            {
                var value = row.GetString(fieldName);
                return value;
            }

It applies to all Get* methods.

0 Kudos