Click here to Skip to main content
15,893,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: LAN API Pin
zubair_ahmed13-Jan-06 19:46
zubair_ahmed13-Jan-06 19:46 
GeneralRe: LAN API Pin
ThatsAlok15-Jan-06 19:12
ThatsAlok15-Jan-06 19:12 
AnswerRe: LAN API Pin
ThatsAlok15-Jan-06 19:10
ThatsAlok15-Jan-06 19:10 
QuestionHow to call CView::OnUpdate Pin
elephantstar13-Jan-06 8:10
elephantstar13-Jan-06 8:10 
AnswerRe: How to call CView::OnUpdate Pin
John M. Drescher13-Jan-06 11:30
John M. Drescher13-Jan-06 11:30 
AnswerRe: How to call CView::OnUpdate Pin
FarPointer13-Jan-06 23:51
FarPointer13-Jan-06 23:51 
QuestionCComboBox GetItemDataPtr ( problem found ) Pin
Maximilien13-Jan-06 5:35
Maximilien13-Jan-06 5:35 
QuestionCOleVariant Empty bstrval Pin
TWS_Dave13-Jan-06 5:34
TWS_Dave13-Jan-06 5:34 
Sigh | :sigh:

I am getting data from a database via CDaoRecordset. The data is coming back in a COleVariant from which I am reading it. However some of the fields in the database are empty which means the COleVariant is also empty. When I try to read an empty COleVariant the program crashes. This occurs when I try to convert the data to a string or date etc.

CString vData;
COleVariant vVarData;

vData = V_BSTRT(&vVarData); //crashes here if the string is empty!!

This works perfectly if the database field and thus the COleVariant is not empty. Does anybody know how to detect an empty COleVariant before trying to actually read it?

Your help would be appreciated

Dave Collins
AnswerRe: COleVariant Empty bstrval Pin
James R. Twine13-Jan-06 6:58
James R. Twine13-Jan-06 6:58 
AnswerRe: COleVariant Empty bstrval Pin
Stephen Hewitt14-Jan-06 2:22
Stephen Hewitt14-Jan-06 2:22 
AnswerRe: COleVariant Empty bstrval Pin
TWS_Dave14-Jan-06 4:57
TWS_Dave14-Jan-06 4:57 
QuestionShockwave Flash Control Pin
zubair_ahmed13-Jan-06 3:31
zubair_ahmed13-Jan-06 3:31 
AnswerRe: Shockwave Flash Control Pin
Prakash Nadar13-Jan-06 5:30
Prakash Nadar13-Jan-06 5:30 
GeneralRe: Shockwave Flash Control Pin
Maximilien13-Jan-06 6:36
Maximilien13-Jan-06 6:36 
GeneralRe: Shockwave Flash Control Pin
Prakash Nadar13-Jan-06 6:38
Prakash Nadar13-Jan-06 6:38 
AnswerRe: Shockwave Flash Control Pin
zubair_ahmed13-Jan-06 20:32
zubair_ahmed13-Jan-06 20:32 
GeneralRe: Shockwave Flash Control Pin
Stephen Hewitt14-Jan-06 2:26
Stephen Hewitt14-Jan-06 2:26 
QuestionOpening an URL in MFC Pin
Aryan S13-Jan-06 3:04
Aryan S13-Jan-06 3:04 
AnswerRe: Opening an URL in MFC Pin
Maximilien13-Jan-06 3:16
Maximilien13-Jan-06 3:16 
AnswerRe: Opening an URL in MFC Pin
ThatsAlok15-Jan-06 19:08
ThatsAlok15-Jan-06 19:08 
QuestionAround 500 controls in a Dialog Pin
AnsGe13-Jan-06 3:03
AnsGe13-Jan-06 3:03 
AnswerRe: Around 500 controls in a Dialog Pin
toxcct13-Jan-06 3:10
toxcct13-Jan-06 3:10 
AnswerRe: Around 500 controls in a Dialog Pin
Maximilien13-Jan-06 3:13
Maximilien13-Jan-06 3:13 
GeneralRe: Around 500 controls in a Dialog Pin
Rajesh R Subramanian13-Jan-06 18:55
professionalRajesh R Subramanian13-Jan-06 18:55 
AnswerRe: Around 500 controls in a Dialog Pin
khan++13-Jan-06 3:18
khan++13-Jan-06 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.