|
-
June 15th, 1999, 12:26 PM
#1
Not able to differentiate between empty column and null column
We are experiencing a problem in finding out whether a column value is NULL or not NULL in VC++;
We are trying out this in ADO programming. We are expecting your useful reply in this regard.
vcpraveen
-
June 15th, 1999, 02:01 PM
#2
Re: Not able to differentiate between empty column and null column
I tend to use the CDaoRecordSet::GetFieldValue() method to grab the value of a field if I don't know whether the column is populated or not.
COleVariant varValue;
// Get field value.
rs.GetFieldValue(_T("MY_COLUMN"), varValue);
// Check if it is NULL or a real value...
-
June 15th, 1999, 02:56 PM
#3
Re: Not able to differentiate between empty column and null column
If you are using the #import ADO version then do the following.
_variant_t var = rs->GetCollect(L"SomeField");
if ( var.vt != VT_NULL )
{
// Assign the value
}
Wayne
-
June 16th, 1999, 10:48 AM
#4
Re: Not able to differentiate between empty column and null column
If you are using DBF_ for field exchange, MFC substitutes a "psuedo" value for NULL columns. These are defined in afxdb_.h
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
|