-
October 31st, 2000, 07:50 AM
#1
ADO (Fieldsptr->GetItem (vFieldIndex)->GetValue () throws an exception when field is empty in
Hi
I am using ADo with ATL COM EXE.
When I access a field value in the database through Fields pointer,
Fieldsptr->GetItem (vFieldIndex)->GetValue () and if the field is empty
then it throws exception.In the debug window of vc++ I can see the exception.
I have written the code like this.
try
{
if (
pFieldsPtr->GetItem (vFieldIndex)->GetValue().vt
!= VT_EMPTY &&
pFieldsPtr->GetItem (vFieldIndex)->GetValue().vt
!= VT_NULL)
{
vFieldName =
pFieldsPtr->GetItem(vFieldIndex)->GetValue ();
}
}
catch (_com_error e)
{
}
catch (...)
{
}
Still the exception occurs and I can see it in Debug window.The program works fine without crashing.Is it OK if exception is shown in debug window?
Please clarify my doubt?
TIA
VENKATESH
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
|