Solved

how do I use IsFieldNull?

Posted on 2000-02-27
2
1,011 Views
Last Modified: 2013-11-20
According to the docs, IsFieldNull takes one parameter, void *pv.   What
does pv want to be pointed at?  The following doesn't work:

CDBVariant     varValue;

m_pRecordSet->GetFieldValue(TableData[0], varValue, SQL_C_SLONG);

if (m_pRecordSet->IsFieldNull(&varValue))
// do something
else
// do something else

Thanks.
0
Comment
Question by:agfk
2 Comments
 
LVL 8

Expert Comment

by:gelbert
ID: 2565573
Check MFC samle Catalog2 in Database section
0
 

Accepted Solution

by:
SDU earned 20 total points
ID: 2581483
You have to use it like that:

if (pRS->IsFieldNull(&pRS->m_Field) )
// do something ;
   else
// do something else

where pRS is your recordet pointer and m_Field is the field you want to test

Regards
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now