Solved

how do I use IsFieldNull?

Posted on 2000-02-27
2
1,052 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 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