|
-
May 20th, 1999, 02:59 PM
#1
Setting True/False Field
When you set a text field in a DAO database, you do something like:
COleVariant v;
v.SetString("Hello", VT_BSTRT);
m_rs.SetFieldValue(field, v);
However, I want to be able to set a True/False field in my database. How do I go about doing this? Do I need to use COleVariant::ChangeType()? And if so, how do I go about doing it? Thanks in advance for any help.
-
May 21st, 1999, 12:54 PM
#2
Re: Setting True/False Field
Well, I figured it out.
BOOL variable=TRUE; //or whatever
m_rs.SetFieldValue(field,
COleVariant((long)variable, VT_BOOL));
I don't know if this is exactly the most efficient method, but it worked for me.
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
|