BUG: ODBC Getchunk Method on Non-Memo Field Causes GPF/UAE (97082)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 2.0
This article was previously published under Q97082 SYMPTOMS
Attempting to use the GetChunk method on a Text field or any field that
has a data type other than Memo results in an unrecoverable application
error (UAE) or a general protection (GP) fault.
CAUSE
The GetChunk method returns a string that represents all or a portion of
a Memo field and only a Memo field in a specified dynaset.
WORKAROUND
To avoid the problem, use code to ensure that the field is a Memo field
before you call the GetChunk method. For example, replace the following
line shown in step 2 of the More Information section of this article:
string1$ = ds(ds.Fields(NonMemoFieldNum%).Name).GetChunk(0, 50)
with this code:
If ds.Fields(NonMemoFieldNum%).type = 12 Then
string1$ = ds(ds.Fields(NonMemoFieldNum%).Name).GetChunk(0, 50)
End If
STATUS
Microsoft has confirmed this to be a bug in the Professional Edition of
Microsoft Visual Basic version 2.0 for Windows. We are researching
this problem and will post new information here in the Microsoft Knowledge
base as it becomes available.
Modification Type: | Minor | Last Reviewed: | 1/9/2003 |
---|
Keywords: | kbbug KB97082 |
---|
|