|
-
April 9th, 1999, 06:37 AM
#1
[ADO] Error on LongVarChar
I wrote some code like below using Visual C++.
<CODE>
_RecordsetPtr rst
FieldsPtr fields;
FieldPtr field;
fields = rst->GetFields();
field = fields->GetItem(0);
_bstr_t str = _bstr_t(field->Value); // <-- Error occur
The field 0's type is adLongVarChar.
And this is terminated by error occurrence.
How to fit a _variant_t of adLongVarChar into a _bstr_t variable?
I'll be happy to receive your answer.
A programmer who loves Goethe.
-
April 13th, 1999, 05:56 AM
#2
Re: [ADO] Error on LongVarChar
Could it be that the value that youare returning is VT_NULL? I have found that it is always a good idea to check for vt!=VT_NULL prior to doing anything with character string
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|